internal PropertyMatch(bool nameMatched, TypeMatchLevels typeMatch, PropertyInfo propertyInfo, MatchSources matchSource, Type nonPropertyMatchType) { NameMatched = nameMatched; TypeMatch = typeMatch; if ((int)TypeMatch > 3) { throw new InvalidOperationException("The TypeMatchLevels must run from 0 to 3, 3 being a perfect match."); } PropertyInfo = propertyInfo; MatchSource = matchSource; NonPropertyMatchType = nonPropertyMatchType; }
/// <summary> /// This is the ctor to create a PropertyMatch /// </summary> /// <param name="nameMatched"></param> /// <param name="typeMatch"></param> /// <param name="propertyInfo"></param> public PropertyMatch(bool nameMatched, TypeMatchLevels typeMatch, PropertyInfo propertyInfo) : this(nameMatched, typeMatch, propertyInfo, MatchSources.Property, null) { }