File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,22 @@ private static void CreateTT(string generatorRoot, string ttRoot)
365365 }
366366 };
367367
368+ // Use the following function if you need to apply additional modifications to a enum
369+ // Called just before UpdateEnumMember
370+ Settings.UpdateEnum = delegate (Enumeration enumeration)
371+ {
372+ //enumeration.EnumAttributes.Add(""[DataContract]"");
373+ };
374+
375+ // Use the following function if you need to apply additional modifications to a enum member
376+ Settings.UpdateEnumMember = delegate (EnumerationMember enumerationMember)
377+ {
378+ //enumerationMember.Attributes.Add(""[EnumMember]"");
379+
380+ //enumerationMember.Attributes.Add(""[SomeAttribute(\"""" + enumerationMember.AllValues[""SomeName""] + "" \"")]"");
381+ };
382+
383+
368384 // Writes any boilerplate stuff inside the POCO class body
369385 Settings.WriteInsideClassBody = delegate(Table t)
370386 {
Original file line number Diff line number Diff line change @@ -268,14 +268,19 @@ public static class Settings
268268 }
269269 } ;
270270
271+ // Use the following function if you need to apply additional modifications to a enum
272+ // Called just before UpdateEnumMember
271273 public static Action < Enumeration > UpdateEnum = delegate ( Enumeration enumeration )
272274 {
273-
275+ //enumeration.EnumAttributes.Add("[DataContract]");
274276 } ;
275277
278+ // Use the following function if you need to apply additional modifications to a enum member
276279 public static Action < EnumerationMember > UpdateEnumMember = delegate ( EnumerationMember enumerationMember )
277280 {
281+ //enumerationMember.Attributes.Add("[EnumMember]");
278282
283+ //enumerationMember.Attributes.Add("[SomeAttribute(\"" + enumerationMember.AllValues["SomeName"] + " \")]");
279284 } ;
280285
281286 // Writes any boilerplate stuff inside the POCO class body
You can’t perform that action at this time.
0 commit comments