comparison Implab/Parsing/EnumAlphabet.cs @ 65:653c4e04968b

minor changes
author cin
date Mon, 30 Jun 2014 13:55:22 +0400
parents 21611344d366
children 97fbbf816844
comparison
equal deleted inserted replaced
64:a809805210d1 65:653c4e04968b
14 /// <typeparam name="T">Тип перечислений</typeparam> 14 /// <typeparam name="T">Тип перечислений</typeparam>
15 public class EnumAlphabet<T> : AlphabetBase<T> where T : struct, IConvertible { 15 public class EnumAlphabet<T> : AlphabetBase<T> where T : struct, IConvertible {
16 static readonly T[] _symbols; 16 static readonly T[] _symbols;
17 static readonly EnumAlphabet<T> _fullAlphabet; 17 static readonly EnumAlphabet<T> _fullAlphabet;
18 18
19 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")]
19 static EnumAlphabet() { 20 static EnumAlphabet() {
20 if (!typeof(T).IsEnum) 21 if (!typeof(T).IsEnum)
21 throw new InvalidOperationException("Invalid generic parameter, enumeration is required"); 22 throw new InvalidOperationException("Invalid generic parameter, enumeration is required");
22 23
23 if (Enum.GetUnderlyingType(typeof(T)) != typeof(Int32)) 24 if (Enum.GetUnderlyingType(typeof(T)) != typeof(Int32))