public EnumMemberInternal(TInt value, string name, AttributeCollection attributes, EnumCache <TInt, TIntProvider> enumCache)
 {
     Value      = value;
     Name       = name;
     Attributes = attributes;
     _enumCache = enumCache;
 }
Beispiel #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;
         }
     }
 }
Beispiel #3
0
 public EnumComparer CreateEnumComparer(EnumCache enumCache) => new EnumComparer <TEnum>(enumCache);
Beispiel #4
0
 private protected EnumComparer(EnumCache enumCache)
 {
     _enumCache = enumCache;
 }
Beispiel #5
0
 public EnumInfo()
 {
     _cache = new EnumCache <TInt, TIntProvider>(typeof(TEnum), this);
 }