public EnumMemberInternal(TInt value, string name, AttributeCollection attributes, EnumCache <TInt, TIntProvider> enumCache)
 {
     Value      = value;
     Name       = name;
     Attributes = attributes;
     _enumCache = enumCache;
 }
예제 #2
0
 public EnumMemberParser(EnumFormat format, EnumCache <TInt, TIntProvider> enumCache)
 {
     _formatValueMap = new Dictionary <string, EnumMemberInternal <TInt, TIntProvider> >(enumCache.GetEnumMemberCount(false), StringComparer.Ordinal);
     foreach (var member in enumCache.GetEnumMembers(false))
     {
         var formattedValue = member.AsString(format);
         if (formattedValue != null)
         {
             _formatValueMap[formattedValue] = member;
         }
     }
 }
예제 #3
0
 public EnumComparer CreateEnumComparer(EnumCache enumCache) => new EnumComparer <TEnum>(enumCache);
예제 #4
0
 private protected EnumComparer(EnumCache enumCache)
 {
     _enumCache = enumCache;
 }
예제 #5
0
 public EnumInfo()
 {
     _cache = new EnumCache <TInt, TIntProvider>(typeof(TEnum), this);
 }