ServiceStack.RestrictAttribute.ToAllowedFlagsSet C# (CSharp) Метод

ToAllowedFlagsSet() приватный статический Метод

Returns the allowed set of scenarios based on the user-specified restrictions
private static ToAllowedFlagsSet ( RequestAttributes restrictToAny ) : RequestAttributes[]
restrictToAny RequestAttributes
Результат 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();
        }