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); }
public static string GetValue(this IRazorDirective directive, RazorDirectiveTokenType type) { return(GetValue(directive, type, skip: 0)); }