@@ -93,23 +93,6 @@ public static class BiosBioTypeExtensions
9393 [ "Biography" ] = BiosBioType . Biography ,
9494 [ "Memoir" ] = BiosBioType . Memoir
9595 } ;
96- private static readonly Dictionary < BiosBioType , string > EnumToString = new Dictionary < BiosBioType , string > ( )
97- {
98- [ BiosBioType . Invalid ] = string . Empty ,
99- [ BiosBioType . Autobiography ] = "Autobiography" ,
100- [ BiosBioType . Biography ] = "Biography" ,
101- [ BiosBioType . Memoir ] = "Memoir"
102- } ;
103- public static BiosBioType ToBiosBioType ( this string me )
104- {
105- return StringToEnum [ me ] ;
106- }
107-
108- public static string Stringify ( this BiosBioType me )
109- {
110- return EnumToString [ me ] ;
111- }
112-
11396 public static HashSet < BiosBioType > ToBiosBioTypeSet ( this string me )
11497 {
11598 return new HashSet < BiosBioType > ( me . Split ( ',' ) . ToList ( ) . Select ( v => StringToEnum [ v ] ) ) ;
@@ -133,23 +116,6 @@ public static class BiosAuthorTypeExtensions
133116 [ "Editor" ] = BiosAuthorType . Editor ,
134117 [ "Translator" ] = BiosAuthorType . Translator
135118 } ;
136- private static readonly Dictionary < BiosAuthorType , string > EnumToString = new Dictionary < BiosAuthorType , string > ( )
137- {
138- [ BiosAuthorType . Invalid ] = string . Empty ,
139- [ BiosAuthorType . Author ] = "Author" ,
140- [ BiosAuthorType . Editor ] = "Editor" ,
141- [ BiosAuthorType . Translator ] = "Translator"
142- } ;
143- public static BiosAuthorType ToBiosAuthorType ( this string me )
144- {
145- return StringToEnum [ me ] ;
146- }
147-
148- public static string Stringify ( this BiosAuthorType me )
149- {
150- return EnumToString [ me ] ;
151- }
152-
153119 public static HashSet < BiosAuthorType > ToBiosAuthorTypeSet ( this string me )
154120 {
155121 return new HashSet < BiosAuthorType > ( me . Split ( ',' ) . ToList ( ) . Select ( v => StringToEnum [ v ] ) ) ;
@@ -173,23 +139,6 @@ public static class MysqlStringTypesCEnumExtensions
173139 [ "medium" ] = MysqlStringTypesCEnum . Medium ,
174140 [ "big" ] = MysqlStringTypesCEnum . Big
175141 } ;
176- private static readonly Dictionary < MysqlStringTypesCEnum , string > EnumToString = new Dictionary < MysqlStringTypesCEnum , string > ( )
177- {
178- [ MysqlStringTypesCEnum . Invalid ] = string . Empty ,
179- [ MysqlStringTypesCEnum . Small ] = "small" ,
180- [ MysqlStringTypesCEnum . Medium ] = "medium" ,
181- [ MysqlStringTypesCEnum . Big ] = "big"
182- } ;
183- public static MysqlStringTypesCEnum ToMysqlStringTypesCEnum ( this string me )
184- {
185- return StringToEnum [ me ] ;
186- }
187-
188- public static string Stringify ( this MysqlStringTypesCEnum me )
189- {
190- return EnumToString [ me ] ;
191- }
192-
193142 public static HashSet < MysqlStringTypesCEnum > ToMysqlStringTypesCEnumSet ( this string me )
194143 {
195144 return new HashSet < MysqlStringTypesCEnum > ( me . Split ( ',' ) . ToList ( ) . Select ( v => StringToEnum [ v ] ) ) ;
@@ -213,23 +162,6 @@ public static class MysqlStringTypesCSetExtensions
213162 [ "coffee" ] = MysqlStringTypesCSet . Coffee ,
214163 [ "milk" ] = MysqlStringTypesCSet . Milk
215164 } ;
216- private static readonly Dictionary < MysqlStringTypesCSet , string > EnumToString = new Dictionary < MysqlStringTypesCSet , string > ( )
217- {
218- [ MysqlStringTypesCSet . Invalid ] = string . Empty ,
219- [ MysqlStringTypesCSet . Tea ] = "tea" ,
220- [ MysqlStringTypesCSet . Coffee ] = "coffee" ,
221- [ MysqlStringTypesCSet . Milk ] = "milk"
222- } ;
223- public static MysqlStringTypesCSet ToMysqlStringTypesCSet ( this string me )
224- {
225- return StringToEnum [ me ] ;
226- }
227-
228- public static string Stringify ( this MysqlStringTypesCSet me )
229- {
230- return EnumToString [ me ] ;
231- }
232-
233165 public static HashSet < MysqlStringTypesCSet > ToMysqlStringTypesCSetSet ( this string me )
234166 {
235167 return new HashSet < MysqlStringTypesCSet > ( me . Split ( ',' ) . ToList ( ) . Select ( v => StringToEnum [ v ] ) ) ;
0 commit comments