private static ToAllowedFlagsSet ( RequestAttributes restrictToAny ) : RequestAttributes[] | ||
restrictToAny | RequestAttributes | |
return | RequestAttributes[] |
private static RequestAttributes[] ToAllowedFlagsSet(RequestAttributes[] restrictToAny)
{
if (restrictToAny.Length == 0)
return new[] { RequestAttributes.Any };
var scenarios = new List<RequestAttributes>();
foreach (var restrictToScenario in restrictToAny)
{
var restrictTo = restrictToScenario.ToAllowedFlagsSet();
scenarios.Add(restrictTo);
}
return scenarios.ToArray();
}