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