Source/NFX/CodeAnalysis/JSON/JSONPatternMatchAttribute.cs
/// <summary>
/// Checks all pattern match attributes against specified member info until first match found
/// </summary>
Checks all pattern match attributes against specified member info until first match found
Checks all pattern match attributes against specified member info until first match found
public static bool Check(MemberInfo info, JSONLexer content)
        {
            var attrs = info.GetCustomAttributes(typeof(JSONPatternMatchAttribute), true).Cast<JSONPatternMatchAttribute>();
            foreach(var attr in attrs)
                if (attr.Match(content)) return true;
            return false;
        }
public static bool Check ( MemberInfo info , JSONLexer content ) { var attrs = info . GetCustomAttributes ( typeof ( JSONPatternMatchAttribute ) , true ) . Cast < JSONPatternMatchAttribute > ( ) ; foreach ( var attr in attrs ) if ( attr . Match ( content ) ) return true ; return false ; }
Checks all pattern match attributes against specified member info until first match found
Checks all pattern match attributes against specified member info until first match found
info
MemberInfo
content
JSONLexer