2 overrides of GetModifiers
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1606
public override DeclarationModifiers
GetModifiers
(SyntaxNode declaration)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
2404
Public Overrides Function
GetModifiers
(declaration As SyntaxNode) As DeclarationModifiers
137 references to GetModifiers
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (2)
69
var modifiers = WithReadOnly(editor.Generator.
GetModifiers
(fieldDeclaration));
82
var modifiers = generator.
GetModifiers
(fieldDeclaration);
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
40
(currentTypeDeclaration, generator) => generator.WithModifiers(currentTypeDeclaration, generator.
GetModifiers
(currentTypeDeclaration).WithIsAbstract(true)));
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
49
var modifiers = generator.
GetModifiers
(node);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (8)
src\Analyzers\CSharp\CodeFixes\MakeAnonymousFunctionStatic\CSharpMakeAnonymousFunctionStaticCodeFixProvider.cs (1)
45
editor.ReplaceNode(anonymousFunction, static (node, generator) => generator.WithModifiers(node, generator.
GetModifiers
(node).WithIsStatic(true)));
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
203
generator.
GetModifiers
(localFunction).WithIsStatic(true));
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
138
var declarationModifiers = generator.
GetModifiers
(memberDeclarator);
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
73
generator.
GetModifiers
(structDeclaration).WithIsRef(true));
src\Analyzers\CSharp\CodeFixes\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableCodeFixProvider.cs (1)
54
var fieldDeclarationModifiers = editor.Generator.
GetModifiers
(fieldDeclaration);
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
103
return (TNode)generator.WithModifiers(node, generator.
GetModifiers
(node).WithIsReadOnly(add));
src\Analyzers\CSharp\CodeFixes\MakeStructReadOnly\CSharpMakeStructReadOnlyCodeFixProvider.cs (1)
46
(current, generator) => generator.WithModifiers(current, generator.
GetModifiers
(current).WithIsReadOnly(true)));
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
67
memberDeclaration, generator.
GetModifiers
(memberDeclaration).WithIsNew(false))));
Microsoft.CodeAnalysis.CSharp.Features (8)
src\Analyzers\CSharp\CodeFixes\MakeAnonymousFunctionStatic\CSharpMakeAnonymousFunctionStaticCodeFixProvider.cs (1)
45
editor.ReplaceNode(anonymousFunction, static (node, generator) => generator.WithModifiers(node, generator.
GetModifiers
(node).WithIsStatic(true)));
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
203
generator.
GetModifiers
(localFunction).WithIsStatic(true));
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
138
var declarationModifiers = generator.
GetModifiers
(memberDeclarator);
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
73
generator.
GetModifiers
(structDeclaration).WithIsRef(true));
src\Analyzers\CSharp\CodeFixes\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableCodeFixProvider.cs (1)
54
var fieldDeclarationModifiers = editor.Generator.
GetModifiers
(fieldDeclaration);
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
103
return (TNode)generator.WithModifiers(node, generator.
GetModifiers
(node).WithIsReadOnly(add));
src\Analyzers\CSharp\CodeFixes\MakeStructReadOnly\CSharpMakeStructReadOnlyCodeFixProvider.cs (1)
46
(current, generator) => generator.WithModifiers(current, generator.
GetModifiers
(current).WithIsReadOnly(true)));
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
67
memberDeclaration, generator.
GetModifiers
(memberDeclaration).WithIsNew(false))));
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (57)
CodeGeneration\SyntaxGeneratorTests.cs (57)
2992
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.ClassDeclaration("c", modifiers: DeclarationModifiers.Abstract)));
2993
Assert.Equal(DeclarationModifiers.Partial, Generator.
GetModifiers
(Generator.StructDeclaration("s", modifiers: DeclarationModifiers.Partial)));
2994
Assert.Equal(DeclarationModifiers.New, Generator.
GetModifiers
(Generator.EnumDeclaration("e", modifiers: DeclarationModifiers.New)));
2995
Assert.Equal(DeclarationModifiers.New, Generator.
GetModifiers
(Generator.DelegateDeclaration("d", modifiers: DeclarationModifiers.New)));
2996
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.MethodDeclaration("m", modifiers: DeclarationModifiers.Static)));
2997
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.ConstructorDeclaration(modifiers: DeclarationModifiers.Static)));
2998
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.ParameterDeclaration("p")));
2999
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), modifiers: DeclarationModifiers.Abstract)));
3001
Assert.Equal(DeclarationModifiers.Const, Generator.
GetModifiers
(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), modifiers: DeclarationModifiers.Const)));
3002
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.EventDeclaration("ef", Generator.IdentifierName("t"), modifiers: DeclarationModifiers.Static)));
3003
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), modifiers: DeclarationModifiers.Static)));
3004
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.EnumMember("v")));
3005
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.NamespaceDeclaration("n")));
3006
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.NamespaceImportDeclaration("u")));
3007
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")));
3008
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.Attribute("a")));
3009
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(TypeParameter("tp")));
3015
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.WithModifiers(Generator.ClassDeclaration("c"), DeclarationModifiers.Abstract)));
3016
Assert.Equal(DeclarationModifiers.Partial, Generator.
GetModifiers
(Generator.WithModifiers(Generator.StructDeclaration("s"), DeclarationModifiers.Partial)));
3017
Assert.Equal(DeclarationModifiers.New, Generator.
GetModifiers
(Generator.WithModifiers(Generator.EnumDeclaration("e"), DeclarationModifiers.New)));
3018
Assert.Equal(DeclarationModifiers.New, Generator.
GetModifiers
(Generator.WithModifiers(Generator.DelegateDeclaration("d"), DeclarationModifiers.New)));
3019
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.MethodDeclaration("m"), DeclarationModifiers.Static)));
3020
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.ConstructorDeclaration(), DeclarationModifiers.Static)));
3021
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.ParameterDeclaration("p"), DeclarationModifiers.Abstract)));
3022
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.WithModifiers(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), DeclarationModifiers.Abstract)));
3024
Assert.Equal(DeclarationModifiers.Const, Generator.
GetModifiers
(Generator.WithModifiers(Generator.FieldDeclaration("f", Generator.IdentifierName("t")), DeclarationModifiers.Const)));
3025
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.EventDeclaration("ef", Generator.IdentifierName("t")), DeclarationModifiers.Static)));
3026
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t")), DeclarationModifiers.Static)));
3027
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.EnumMember("v"), DeclarationModifiers.Partial)));
3028
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.NamespaceDeclaration("n"), DeclarationModifiers.Abstract)));
3029
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.NamespaceImportDeclaration("u"), DeclarationModifiers.Abstract)));
3030
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), DeclarationModifiers.Abstract)));
3031
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.Attribute("a"), DeclarationModifiers.Abstract)));
3032
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(TypeParameter("tp"), DeclarationModifiers.Abstract)));
3042
Generator.
GetModifiers
(Generator.WithModifiers(Generator.ClassDeclaration("c"), allModifiers)));
3046
Generator.
GetModifiers
(Generator.WithModifiers(Generator.StructDeclaration("s"), allModifiers)));
3050
Generator.
GetModifiers
(Generator.WithModifiers(Generator.InterfaceDeclaration("i"), allModifiers)));
3054
Generator.
GetModifiers
(Generator.WithModifiers(Generator.DelegateDeclaration("d"), allModifiers)));
3058
Generator.
GetModifiers
(Generator.WithModifiers(Generator.EnumDeclaration("e"), allModifiers)));
3062
Generator.
GetModifiers
(Generator.WithModifiers(Generator.FieldDeclaration("f", Generator.IdentifierName("t")), allModifiers)));
3066
Generator.
GetModifiers
(Generator.WithModifiers(Generator.ConstructorDeclaration("c"), allModifiers)));
3070
Generator.
GetModifiers
(Generator.WithModifiers(DestructorDeclaration("c"), allModifiers)));
3074
Generator.
GetModifiers
(Generator.WithModifiers(Generator.MethodDeclaration("m"), allModifiers)));
3078
Generator.
GetModifiers
(Generator.WithModifiers(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), allModifiers)));
3086
Generator.
GetModifiers
(Generator.WithModifiers(Generator.EventDeclaration("ef", Generator.IdentifierName("t")), allModifiers)));
3090
Generator.
GetModifiers
(Generator.WithModifiers(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t")), allModifiers)));
3094
Generator.
GetModifiers
(Generator.WithModifiers(AccessorDeclaration(SyntaxKind.GetAccessorDeclaration), allModifiers)));
3129
var fileAbstractClass = Generator.WithModifiers(fileClass, Generator.
GetModifiers
(fileClass).WithIsAbstract(true));
3149
var fileAbstractClass = Generator.WithModifiers(abstractClass, Generator.
GetModifiers
(abstractClass).WithIsFile(true));
3159
var filePublicClass = Generator.WithModifiers(publicClass, Generator.
GetModifiers
(publicClass).WithIsFile(true));
3169
var updatedProperty = Generator.WithModifiers(property, Generator.
GetModifiers
(property).WithIsRequired(true));
3177
var updatedProperty = Generator.WithModifiers(property, Generator.
GetModifiers
(property).WithIsVirtual(true));
3187
var updatedProperty = Generator.WithModifiers(property, Generator.
GetModifiers
(property).WithIsRequired(true));
3800
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(declX));
3806
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(declY));
3812
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(declZ));
3837
Assert.Equal(DeclarationModifiers.ReadOnly, Generator.
GetModifiers
(xReadOnly));
Microsoft.CodeAnalysis.Features (7)
Completion\Providers\AbstractAwaitCompletionProvider.cs (1)
107
var makeContainerAsync = declaration is not null && !SyntaxGenerator.GetGenerator(document).
GetModifiers
(declaration).IsAsync;
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
52
if (declarator != null && generator.
GetModifiers
(declarator).IsConst)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
212
return generator.
GetModifiers
(declaration).IsConst;
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (2)
69
var modifiers = WithReadOnly(editor.Generator.
GetModifiers
(fieldDeclaration));
82
var modifiers = generator.
GetModifiers
(fieldDeclaration);
src\Analyzers\Core\CodeFixes\MakeTypeAbstract\AbstractMakeTypeAbstractCodeFixProvider.cs (1)
40
(currentTypeDeclaration, generator) => generator.WithModifiers(currentTypeDeclaration, generator.
GetModifiers
(currentTypeDeclaration).WithIsAbstract(true)));
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
49
var modifiers = generator.
GetModifiers
(node);
Microsoft.CodeAnalysis.VisualBasic.Features (2)
RemoveSharedFromModuleMembers\VisualBasicRemoveSharedFromModuleMembersCodeFixProvider.vb (1)
74
Return generator.WithModifiers(node, generator.
GetModifiers
(node).WithIsStatic(False))
UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (1)
63
statement = DirectCast(generator.WithModifiers(statement, generator.
GetModifiers
(propertyDeclaration).WithIsReadOnly(canBeReadOnly)), PropertyStatementSyntax)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (45)
CodeGeneration\SyntaxGeneratorTests.vb (45)
896
Assert.Equal(DeclarationModifiers.Sealed, Generator.
GetModifiers
(md))
903
Assert.Equal(DeclarationModifiers.Sealed + DeclarationModifiers.Override, Generator.
GetModifiers
(md2))
910
Assert.Equal(DeclarationModifiers.Sealed, Generator.
GetModifiers
(cd))
921
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(md))
927
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(cd))
2697
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.ClassDeclaration("c", modifiers:=DeclarationModifiers.Abstract)))
2698
Assert.Equal(DeclarationModifiers.Partial, Generator.
GetModifiers
(Generator.StructDeclaration("s", modifiers:=DeclarationModifiers.Partial)))
2699
Assert.Equal(DeclarationModifiers.[New], Generator.
GetModifiers
(Generator.EnumDeclaration("e", modifiers:=DeclarationModifiers.[New])))
2700
Assert.Equal(DeclarationModifiers.[New], Generator.
GetModifiers
(Generator.DelegateDeclaration("d", modifiers:=DeclarationModifiers.[New])))
2701
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Static)))
2702
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.ConstructorDeclaration(modifiers:=DeclarationModifiers.Static)))
2703
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.ParameterDeclaration("p")))
2704
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2705
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract)))
2706
Assert.Equal(DeclarationModifiers.Const, Generator.
GetModifiers
(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Const)))
2707
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.EventDeclaration("ef", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Static)))
2708
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Static)))
2709
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.EnumMember("v")))
2710
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.NamespaceDeclaration("n")))
2711
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.NamespaceImportDeclaration("u")))
2712
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")))
2713
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.Attribute("a")))
2714
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(SyntaxFactory.TypeParameter("tp")))
2719
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.WithModifiers(Generator.ClassDeclaration("c"), DeclarationModifiers.Abstract)))
2720
Assert.Equal(DeclarationModifiers.Partial, Generator.
GetModifiers
(Generator.WithModifiers(Generator.StructDeclaration("s"), DeclarationModifiers.Partial)))
2721
Assert.Equal(DeclarationModifiers.[New], Generator.
GetModifiers
(Generator.WithModifiers(Generator.EnumDeclaration("e"), DeclarationModifiers.[New])))
2722
Assert.Equal(DeclarationModifiers.[New], Generator.
GetModifiers
(Generator.WithModifiers(Generator.DelegateDeclaration("d"), DeclarationModifiers.[New])))
2723
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.MethodDeclaration("m"), DeclarationModifiers.Static)))
2724
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.ConstructorDeclaration(), DeclarationModifiers.Static)))
2725
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.ParameterDeclaration("p"), DeclarationModifiers.Abstract)))
2726
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.WithModifiers(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")), DeclarationModifiers.Abstract)))
2727
Assert.Equal(DeclarationModifiers.Abstract, Generator.
GetModifiers
(Generator.WithModifiers(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t")), DeclarationModifiers.Abstract)))
2728
Assert.Equal(DeclarationModifiers.Const, Generator.
GetModifiers
(Generator.WithModifiers(Generator.FieldDeclaration("f", Generator.IdentifierName("t")), DeclarationModifiers.Const)))
2729
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.EventDeclaration("ef", Generator.IdentifierName("t")), DeclarationModifiers.Static)))
2730
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(Generator.WithModifiers(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t")), DeclarationModifiers.Static)))
2731
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.EnumMember("v"), DeclarationModifiers.Partial)))
2732
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.NamespaceDeclaration("n"), DeclarationModifiers.Abstract)))
2733
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.NamespaceImportDeclaration("u"), DeclarationModifiers.Abstract)))
2734
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), DeclarationModifiers.Abstract)))
2735
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(Generator.Attribute("a"), DeclarationModifiers.Abstract)))
2736
Assert.Equal(DeclarationModifiers.None, Generator.
GetModifiers
(Generator.WithModifiers(SyntaxFactory.TypeParameter("tp"), DeclarationModifiers.Abstract)))
3491
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(declX))
3497
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(declY))
3503
Assert.Equal(DeclarationModifiers.Static, Generator.
GetModifiers
(declZ))
3528
Assert.Equal(DeclarationModifiers.ReadOnly, Generator.
GetModifiers
(xReadOnly))
Microsoft.Interop.ComInterfaceGenerator (4)
Analyzers\AddGeneratedComClassFixer.cs (1)
30
var declarationModifiers = gen.
GetModifiers
(updatedNode);
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (2)
110
var declarationModifiers = gen.
GetModifiers
(member);
138
editor.ReplaceNode(node, (node, gen) => gen.WithModifiers(node, gen.
GetModifiers
(node).WithPartial(true)));
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
236
editor.ReplaceNode(node, (node, gen) => gen.WithModifiers(node, gen.
GetModifiers
(node).WithPartial(true)));
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\ConvertToLibraryImportFixer.cs (1)
262
generator.
GetModifiers
(methodSyntax)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
236
editor.ReplaceNode(node, (node, gen) => gen.WithModifiers(node, gen.
GetModifiers
(node).WithPartial(true)));