private static MemberInfo ForValue(ApiRegex p) { return(typeof(ApiRegex).GetField(Enum.GetName(typeof(ApiRegex), p))); }
public static string Pattern(this ApiRegex p) { return(((ApiRegexAttr)Attribute.GetCustomAttribute(ForValue(p), typeof(ApiRegexAttr))).Pattern); }
internal ProtocolTypeAttr(ApiRegex apiRegex, int minLength = 0, int maxLength = 0) { ApiRegex = apiRegex; MinLength = minLength; MaxLength = maxLength; }