public static DetectionType[] ProcessExcludedDetectionTypes(DetectionType[] excludedDetectionTypes)
{
if (excludedDetectionTypes == null || excludedDetectionTypes.Length == 0)
{
return excludedDetectionTypes;
}
if (excludedDetectionTypes.Length == 1)
{
if (excludedDetectionTypes[0] == DetectionType.None)
{
return new DetectionType[] { };
}
}
else
{
if (excludedDetectionTypes.Contains(DetectionType.None))
{
throw new Exception(string.Format(Properties.Resources.InvalidExcludedDetectionTypeSet, DetectionType.None));
}
}
return excludedDetectionTypes;
}