@@ -24,7 +24,8 @@ public void Execute(GeneratorExecutionContext context)
24
24
// Debugger.Launch();
25
25
// }
26
26
//#endif
27
- context . AddSource ( $ "{ SourceGeneratorHelper . AttributeName } Attribute.g.cs", SourceText . From ( $@ "
27
+ context . AddSource ( $ "{ SourceGeneratorHelper . AttributeName } Attribute.g.cs", SourceText . From (
28
+ $@ "// <auto-generated />
28
29
using System;
29
30
using System.CodeDom.Compiler;
30
31
namespace { SourceGeneratorHelper . NameSpace }
@@ -107,14 +108,18 @@ public sealed class {SourceGeneratorHelper.AttributeName}Attribute : Attribute
107
108
}
108
109
}
109
110
110
- var sourceBuilder = new StringBuilder ( $@ "using System;
111
+
112
+ var sourceBuilder = new StringBuilder ( $@ "// <auto-generated />
113
+ using System;
114
+ using System.CodeDom.Compiler;
111
115
using System.Collections.Generic;
112
116
using System.Collections.Immutable;
113
117
namespace { SourceGeneratorHelper . NameSpace }
114
118
{{
115
119
/// <summary>
116
120
/// Provides extension methods for operations related to the <see cref=""global::{ symbol . FullName ( ) } "" /> enumeration.
117
- /// </summary>
121
+ /// </summary>
122
+ [GeneratedCodeAttribute(""Supernova.Enum.Generators"", null)]
118
123
{ symbol . DeclaredAccessibility . ToString ( "G" ) . ToLower ( ) } static class { symbol . Name } EnumExtensions
119
124
{{" ) ;
120
125
@@ -147,8 +152,8 @@ namespace {SourceGeneratorHelper.NameSpace}
147
152
148
153
//GetLength
149
154
GetLengthFast ( sourceBuilder , symbol , e ) ;
150
-
151
-
155
+
156
+
152
157
//TryParse
153
158
TryParseFast ( sourceBuilder , e , symbol ) ;
154
159
@@ -399,7 +404,7 @@ private static void GetLengthFast(StringBuilder sourceBuilder, ISymbol symbol, E
399
404
}
400
405
" ) ;
401
406
}
402
-
407
+
403
408
private static void TryParseFast ( StringBuilder sourceBuilder , EnumDeclarationSyntax e , ISymbol symbol )
404
409
{
405
410
sourceBuilder . Append ( $@ "
0 commit comments