File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
using System . Collections . Generic ;
5
5
using System . Linq ;
6
+ using Microsoft . CodeAnalysis . CSharp ;
6
7
using Microsoft . CodeAnalysis . CSharp . Syntax ;
7
8
using static Microsoft . CodeAnalysis . CSharp . SyntaxFactory ;
8
9
@@ -29,6 +30,7 @@ public CSharpEnum(CSharpIdentifier identifier)
29
30
/// <inheritdoc/>
30
31
protected override MemberDeclarationSyntax GetMemberDeclaration ( )
31
32
=> EnumDeclaration ( Identifier . Name )
33
+ . AddModifiers ( Token ( SyntaxKind . PublicKeyword ) )
32
34
. WithMembers ( SeparatedList ( Values . Select ( value => value . ToSyntax ( ) ) ) ) ;
33
35
34
36
/// <inheritdoc/>
Original file line number Diff line number Diff line change 3
3
4
4
using System . Collections . Generic ;
5
5
using System . Linq ;
6
+ using Microsoft . CodeAnalysis . CSharp ;
6
7
using Microsoft . CodeAnalysis . CSharp . Syntax ;
7
8
using static Microsoft . CodeAnalysis . CSharp . SyntaxFactory ;
8
9
@@ -34,7 +35,9 @@ public CSharpInterface(CSharpIdentifier identifier)
34
35
/// <inheritdoc/>
35
36
protected override MemberDeclarationSyntax GetMemberDeclaration ( )
36
37
{
37
- var declaration = GetTypeDeclaration ( ) . WithMembers ( List ( GetMemberDeclarations ( ) ) ) ;
38
+ var declaration = GetTypeDeclaration ( )
39
+ . AddModifiers ( Token ( SyntaxKind . PublicKeyword ) , Token ( SyntaxKind . PartialKeyword ) )
40
+ . WithMembers ( List ( GetMemberDeclarations ( ) ) ) ;
38
41
39
42
var baseTypes = GetBaseTypes ( ) . ToList ( ) ;
40
43
return baseTypes . Any ( )
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ public CompilationUnitSyntax ToSyntax()
42
42
namespaces . Remove ( Identifier . Namespace ) ;
43
43
44
44
var member = GetMemberDeclaration ( )
45
- . AddModifiers ( Token ( SyntaxKind . PublicKeyword ) , Token ( SyntaxKind . PartialKeyword ) )
46
45
. WithAttributeLists ( List ( Attributes . Select ( x => x . ToSyntax ( ) ) ) )
47
46
. WithDocumentation ( Summary ) ;
48
47
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ namespace Namespace1
38
38
/// My enum
39
39
/// Details
40
40
/// </summary>
41
- public partial enum MyEnum
41
+ public enum MyEnum
42
42
{
43
43
/// <summary>
44
44
/// My value 1
You can’t perform that action at this time.
0 commit comments