示例#1
0
        public static string GetValue(this IRazorDirective directive, RazorDirectiveTokenType type, int skip)
        {
            for (var i = 0; i < directive.Tokens.Count; i++)
            {
                var token = directive.Tokens[i];

                if (token.Descriptor.Type == type)
                {
                    if (skip-- == 0)
                    {
                        return(token.Value);
                    }
                }
            }

            return(null);
        }
示例#2
0
 public static string GetValue(this IRazorDirective directive, RazorDirectiveTokenType type)
 {
     return(GetValue(directive, type, skip: 0));
 }