Exemplo n.º 1
0
        static bool NoCandidateHasQueryLiteralRequirementsAndThereIsAnEmptyFallback(
            IList <UriTemplateTableMatchCandidate> candidates)
        {
            bool thereIsAmEmptyFallback = false;

            for (int i = 0; i < candidates.Count; i++)
            {
                if (UriTemplateHelpers.HasQueryLiteralRequirements(candidates[i].Template))
                {
                    return(false);
                }
                if (candidates[i].Template.queries.Count == 0)
                {
                    thereIsAmEmptyFallback = true;
                }
            }
            return(thereIsAmEmptyFallback);
        }
        private static bool NoCandidateHasQueryLiteralRequirementsAndThereIsAnEmptyFallback(IList <UriTemplateTableMatchCandidate> candidates)
        {
            bool flag = false;

            for (int i = 0; i < candidates.Count; i++)
            {
                UriTemplateTableMatchCandidate candidate = candidates[i];
                if (UriTemplateHelpers.HasQueryLiteralRequirements(candidate.Template))
                {
                    return(false);
                }
                UriTemplateTableMatchCandidate candidate2 = candidates[i];
                if (candidate2.Template.queries.Count == 0)
                {
                    flag = true;
                }
            }
            return(flag);
        }