public static bool IsResourceSecurable(string resource)
{
// Check if resource is excluded explicitly.
foreach (string exclusion in s_excludedResources)
{
if (IsRegexMatch(exclusion, resource))
return false;
}
// Check if resource is included explicitly.
foreach (KeyValuePair<string, string> inclusion in s_includedResources)
{
foreach (string item in inclusion.Key.Split(','))
{
if (IsRegexMatch(item.Trim(), resource))
return true;
}
}
return false;
}