2 types derived from SyntaxGenerator
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
29internal sealed class CSharpSyntaxGenerator : SyntaxGenerator
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
19Inherits SyntaxGenerator
779 references to SyntaxGenerator
ILLink.CodeFixProvider (9)
BaseAttributeCodeFixProvider.cs (3)
70 var attributeArguments = GetAttributeArguments (attributableSymbol, targetSymbol, SyntaxGenerator.GetGenerator (document), diagnostic); 73 var generator = editor.Generator; 131 SyntaxGenerator syntaxGenerator,
DynamicallyAccessedMembersCodeFixProvider.cs (1)
134 var generator = editor.Generator;
RequiresAssemblyFilesCodeFixProvider.cs (1)
35 protected override SyntaxNode[] GetAttributeArguments (ISymbol? attributableSymbol, ISymbol targetSymbol, SyntaxGenerator syntaxGenerator, Diagnostic diagnostic) =>
RequiresDynamicCodeCodeFixProvider.cs (1)
32 protected override SyntaxNode[] GetAttributeArguments (ISymbol? attributableSymbol, ISymbol targetSymbol, SyntaxGenerator syntaxGenerator, Diagnostic diagnostic) =>
RequiresHelpers.cs (1)
13 internal static SyntaxNode[] GetAttributeArgumentsForRequires (ISymbol targetSymbol, SyntaxGenerator syntaxGenerator, bool hasPublicAccessibility)
RequiresUnreferencedCodeCodeFixProvider.cs (1)
32 protected override SyntaxNode[] GetAttributeArguments (ISymbol? attributableSymbol, ISymbol targetSymbol, SyntaxGenerator syntaxGenerator, Diagnostic diagnostic) =>
UnconditionalSuppressMessageCodeFixProvider.cs (1)
40 protected override SyntaxNode[] GetAttributeArguments (ISymbol? attributableSymbol, ISymbol targetSymbol, SyntaxGenerator syntaxGenerator, Diagnostic diagnostic)
Microsoft.Analyzers.Extra (3)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (3)
364SyntaxGenerator gen) 474var gen = docEditor.Generator; 584var gen = docEditor.Generator;
Microsoft.CodeAnalysis.CodeStyle.Fixes (161)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
31var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
86var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
115var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (2)
48var syntaxGenerator = document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
86SyntaxGenerator generator,
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (3)
438var delegatingArguments = this.GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateArguments(_delegatedConstructor.Parameters); 476: GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateAssignmentStatements( 503GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateMemberDelegatingConstructor(
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (2)
54var syntaxFactory = _document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
67var syntaxFactory = _document.Project.Solution.Services.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (3)
71SyntaxGenerator factory, 97SyntaxGenerator factory, 197SyntaxGenerator factory,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (2)
88var syntaxFactory = destinationProvider.GetService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
116var syntaxFactory = _semanticDocument.Project.Solution.Services.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
56var syntaxFactory = _document.GetLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (8)
180var generator = SyntaxGenerator.GetGenerator(_document); 208var generator = _document.GetRequiredLanguageService<Microsoft.CodeAnalysis.Editing.SyntaxGenerator>(); 240var generator = _document.GetRequiredLanguageService<Microsoft.CodeAnalysis.Editing.SyntaxGenerator>(); 254var generator = _document.GetRequiredLanguageService<Microsoft.CodeAnalysis.Editing.SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
35protected abstract SyntaxNode CreateFinalizer(SyntaxGenerator generator, INamedTypeSymbol classType, string disposeMethodDisplayString);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (5)
295var factory = Document.GetRequiredLanguageService<SyntaxGenerator>(); 312private ISymbol GenerateEvent(Compilation compilation, string memberName, bool generateInvisibly, SyntaxGenerator factory, DeclarationModifiers modifiers, bool useExplicitInterfaceSymbol, Accessibility accessibility, IEventSymbol @event) 335var generator = Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (8)
106var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 129var g = this.Document.GetRequiredLanguageService<SyntaxGenerator>(); 148var g = this.Document.GetRequiredLanguageService<SyntaxGenerator>(); 193var g = this.Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (2)
54var factory = Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (6)
40var factory = Document.GetLanguageService<SyntaxGenerator>(); 163var generator = Document.GetRequiredLanguageService<SyntaxGenerator>(); 178var generator = Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
59var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\MakeMemberStatic\AbstractMakeMemberStaticCodeFixProvider.cs (2)
41var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
32var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (5)
43protected abstract TSwitchArmSyntax CreateSwitchArm(SyntaxGenerator generator, Compilation compilation, TMemberAccessExpression caseLabel); 44protected abstract TSwitchArmSyntax CreateNullSwitchArm(SyntaxGenerator generator, Compilation compilation); 45protected abstract TSwitchArmSyntax CreateDefaultSwitchArm(SyntaxGenerator generator, Compilation compilation); 47protected abstract TSwitchSyntax InsertSwitchArms(SyntaxGenerator generator, TSwitchSyntax switchNode, int insertLocation, List<TSwitchArmSyntax> newArms); 173var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
52protected static TExpressionSyntax Exception(SyntaxGenerator generator, Compilation compilation)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (4)
68protected sealed override TSwitchSyntax InsertSwitchArms(SyntaxGenerator generator, TSwitchSyntax switchNode, int insertLocation, List<TSwitchArmSyntax> newArms) 71protected sealed override TSwitchArmSyntax CreateDefaultSwitchArm(SyntaxGenerator generator, Compilation compilation) 74protected sealed override TSwitchArmSyntax CreateSwitchArm(SyntaxGenerator generator, Compilation compilation, TMemberAccessExpression caseLabel) 77protected override TSwitchArmSyntax CreateNullSwitchArm(SyntaxGenerator generator, Compilation compilation)
src\Analyzers\Core\CodeFixes\QualifyMemberAccess\AbstractQualifyMemberAccessCodeFixProvider.cs (2)
39var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (10)
26protected abstract SyntaxNode RemoveAsyncModifier(SyntaxGenerator generator, SyntaxNode methodLikeNode); 68var generator = editor.Generator; 120SyntaxGenerator generator, 166private static ControlFlowAnalysis? GetControlFlowAnalysis(SyntaxGenerator generator, SemanticModel semanticModel, SyntaxNode node) 177private static SyntaxNode AddReturnStatement(SyntaxGenerator generator, SyntaxNode node) 183SyntaxGenerator generator, 214private static SyntaxNode GetReturnTaskCompletedTaskStatement(SyntaxGenerator generator, ITypeSymbol returnType, KnownTaskTypes knownTypes) 231private static SyntaxNode WrapExpressionWithTaskFromResult(SyntaxGenerator generator, SyntaxNode expression, ITypeSymbol returnType, KnownTaskTypes knownTypes) 249private static SyntaxNode TypeExpressionForStaticMemberAccess(SyntaxGenerator generator, INamedTypeSymbol typeSymbol) 258static SyntaxNode QualifiedNameToMemberAccess(int qualifiedNameSyntaxKind, int memberAccessExpressionSyntaxKind, SyntaxNode expression, SyntaxGenerator generator)
src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
39var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (1)
75var options = SyntaxGenerator.DefaultRemoveOptions;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
647var removeOptions = SyntaxGenerator.DefaultRemoveOptions; 903var rootWithRemovedDeclaration = root.RemoveNode(newDecl, SyntaxGenerator.DefaultRemoveOptions | SyntaxRemoveOptions.KeepLeadingTrivia);
src\Analyzers\Core\CodeFixes\SimplifyBooleanExpression\SimplifyConditionalCodeFixProvider.cs (2)
41var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
54var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
67var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
40var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
46var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
93ISyntaxFactsService syntaxFacts, SyntaxGenerator generator,
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (3)
90var generator = SyntaxGenerator.GetGenerator(document); 158SyntaxGenerator generator, IOperation statement, IOperation value)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
107var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
18var removeOptions = SyntaxGenerator.DefaultRemoveOptions;
src\Analyzers\Core\CodeFixes\UseExplicitTupleName\UseExplicitTupleNameCodeFixProvider.cs (1)
38var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseSystemHashCode\UseSystemHashCodeCodeFixProvider.cs (2)
39var generator = SyntaxGenerator.GetGenerator(document);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContextInfo.cs (2)
24public SyntaxGenerator Generator => GeneratorImpl; 28protected abstract SyntaxGenerator GeneratorImpl { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
20SyntaxGenerator factory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\NullableSyntaxAnnotation.cs (1)
10/// Annotation placed on <see cref="ITypeSymbol"/>s that the <see cref="SyntaxGenerator"/> converts to a node. This
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
26var generator = editor.Generator;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (5)
42var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 96private static SyntaxNode GenerateNamespaceImportDeclaration(INamespaceSymbol namespaceSymbol, SyntaxGenerator generator) 109SyntaxGenerator generator, 170SyntaxGenerator generator,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (20)
31this SyntaxGenerator codeDefinitionFactory, Compilation compilation) 38this SyntaxGenerator codeDefinitionFactory, Compilation compilation) 44private static SyntaxNode CreateNewNotImplementedException(SyntaxGenerator codeDefinitionFactory, Compilation compilation) 56this SyntaxGenerator codeDefinitionFactory, Compilation compilation) 60this SyntaxGenerator factory, 67this SyntaxGenerator factory, 74this SyntaxGenerator factory, 102this SyntaxGenerator generator, IMethodSymbol method, ISymbol throughMember) 117this SyntaxGenerator generator, ISymbol member, ISymbol throughMember) 181static SyntaxNode GenerateContainerName(SyntaxGenerator factory, ISymbol throughMember) 191this SyntaxGenerator generator, 230this SyntaxGenerator generator, 343this SyntaxGenerator factory, 394this SyntaxGenerator factory, 434this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter, SyntaxNode fieldAccess) 443public static SyntaxNode CreateThrowArgumentNullExpression(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 446private static SyntaxNode CreateNewArgumentNullException(SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 456this SyntaxGenerator factory, 468this SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, string identifierName) 478public static SyntaxNode CreateThrowArgumentNullExceptionStatement(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (7)
33this SyntaxGenerator factory, 65this SyntaxGenerator factory, 110SyntaxGenerator factory, 219SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, 272SyntaxGenerator factory, 323SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, ParseOptions parseOptions, SyntaxNode otherNameExpression, ArrayBuilder<SyntaxNode> expressions) 457this SyntaxGenerator factory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (6)
18this SyntaxGenerator factory, 42this SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, 80this SyntaxGenerator factory, 179this SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, INamedTypeSymbol namedTypeSymbol, 187private static SyntaxNode CreateLiteralExpression(SyntaxGenerator factory, int value) 218SyntaxGenerator factory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (11)
36this SyntaxGenerator generator, 46this SyntaxGenerator generator, 57this SyntaxGenerator generator, 142SyntaxGenerator generator, 234SyntaxGenerator generator, 262private static SyntaxNode GetNegationOfIsPatternExpression(SyntaxNode isExpression, SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, CancellationToken cancellationToken) 381SyntaxGenerator generator, 473SyntaxGenerator generator, 497SyntaxGenerator generator, 533SyntaxGenerator generator, 550SyntaxGenerator generator,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (3)
31protected abstract ImmutableArray<SyntaxNode> GetGlobalImports(Compilation compilation, SyntaxGenerator generator); 59SyntaxGenerator generator) 135SyntaxGenerator generator,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\IAddImportsService.cs (3)
29bool HasExistingImport(Compilation compilation, SyntaxNode root, SyntaxNode? contextLocation, SyntaxNode import, SyntaxGenerator generator); 39IEnumerable<SyntaxNode> newImports, SyntaxGenerator generator, AddImportPlacementOptions options, CancellationToken cancellationToken); 46SyntaxNode contextLocation, SyntaxNode newImport, SyntaxGenerator generator, AddImportPlacementOptions options,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
145var generator = editor.Generator;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxGeneratorInternalExtensions\SyntaxGeneratorInternal.cs (3)
15/// Internal extensions to <see cref="SyntaxGenerator"/>. 19/// made public APIs, they can be moved to <see cref="SyntaxGenerator"/>. 103public abstract SyntaxNode NegateEquality(SyntaxGenerator generator, SyntaxNode binaryExpression, SyntaxNode left, BinaryOperatorKind negatedKind, SyntaxNode right);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
302var gen = SyntaxGenerator.GetGenerator(document);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (42)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
155SyntaxGenerator generator, ImmutableArray<IParameterSymbol> unassignedParameters)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (1)
46var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAtStartCodeFixProvider.cs (1)
60var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (2)
80var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
93SyntaxGenerator g, INamedTypeSymbol classType, string disposeMethodDisplayString)
src\Analyzers\CSharp\CodeFixes\MakeAnonymousFunctionStatic\CSharpMakeAnonymousFunctionStaticCodeFixProvider.cs (1)
40var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
200public static SyntaxNode AddStaticModifier(SyntaxNode localFunction, SyntaxGenerator generator)
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
110var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (2)
69var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
41var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\PopulateSwitch\CSharpPopulateSwitchExpressionCodeFixProvider.cs (4)
30protected override SwitchExpressionArmSyntax CreateDefaultSwitchArm(SyntaxGenerator generator, Compilation compilation) 33protected override SwitchExpressionArmSyntax CreateSwitchArm(SyntaxGenerator generator, Compilation compilation, MemberAccessExpressionSyntax caseLabel) 36protected override SwitchExpressionArmSyntax CreateNullSwitchArm(SyntaxGenerator generator, Compilation compilation) 39protected override SwitchExpressionSyntax InsertSwitchArms(SyntaxGenerator generator, SwitchExpressionSyntax switchNode, int insertLocation, List<SwitchExpressionArmSyntax> newArms)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (2)
51protected override SyntaxNode RemoveAsyncModifier(SyntaxGenerator generator, SyntaxNode methodLikeNode) 63private static SyntaxNode AnnotateBlock(SyntaxGenerator generator, SyntaxNode node)
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
64var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
60var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (2)
44var generator = context.Document.GetRequiredLanguageService<SyntaxGenerator>(); 58SyntaxGenerator generator,
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (1)
38var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
82var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (6)
53var syntaxGenerator = SyntaxGenerator.GetGenerator(document); 66SyntaxGenerator generator, 84private static ExpressionSyntax FixOne(Result result, SyntaxGenerator generator) 124private static RangeExpressionSyntax CreateRangeExpression(Result result, SyntaxGenerator generator) 234private static RangeExpressionSyntax CreateConstantRange(Result result, SyntaxGenerator generator)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
193return SyntaxGenerator.GetGenerator(document).CastExpression(delegateType, reference);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (3)
222if (constructorRemoveOptions == SyntaxGenerator.DefaultRemoveOptions) 235if (memberRemoveOptions != SyntaxGenerator.DefaultRemoveOptions) 554: SyntaxGenerator.DefaultRemoveOptions;
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
97var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
43var generator = editor.Generator;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationContextInfo.cs (2)
25protected override SyntaxGenerator GeneratorImpl 26=> Service.LanguageServices.GetRequiredService<SyntaxGenerator>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpAddImportsService.cs (1)
36protected override ImmutableArray<SyntaxNode> GetGlobalImports(Compilation compilation, SyntaxGenerator generator)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
183public override SyntaxNode NegateEquality(SyntaxGenerator generator, SyntaxNode binaryExpression, SyntaxNode left, BinaryOperatorKind negatedKind, SyntaxNode right)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\CSharpInitializeParameterService.cs (1)
54var generator = editor.Generator;
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
331var syntaxFactory = semanticDocument.Document.GetRequiredLanguageService<SyntaxGenerator>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
CodeGeneration\SyntaxGeneratorTests.cs (2)
23var g = CSharpSyntaxGenerator.Instance; 57var g = CSharpSyntaxGenerator.Instance;
Microsoft.CodeAnalysis.CSharp.Features (104)
AddFileBanner\CSharpAddFileBannerNewDocumentFormattingProvider.cs (1)
22protected override SyntaxGenerator SyntaxGenerator => CSharpSyntaxGenerator.Instance;
AddImport\CSharpAddImportFeatureService.cs (6)
384var generator = SyntaxGenerator.GetGenerator(document); 401var generator = SyntaxGenerator.GetGenerator(document); 447var generator = SyntaxGenerator.GetGenerator(document);
ChangeSignature\CSharpChangeSignatureService.cs (1)
38protected override SyntaxGenerator Generator => CSharpSyntaxGenerator.Instance;
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
135var generator = CSharpSyntaxGenerator.Instance;
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
48string fieldName, SyntaxGenerator generator, CancellationToken cancellationToken)
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (2)
61var generator = editor.Generator; 117SyntaxGenerator generator, ForEachInfo foreachInfo, SyntaxNode collectionVariableName, SyntaxToken indexVariable, bool donotCastElement)
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (3)
44var newRoot = root.RemoveNodes(root.Members.OfType<GlobalStatementSyntax>().Skip(1), SyntaxGenerator.DefaultRemoveOptions); 48newRoot = newRoot.RemoveNode(oldClassDeclaration, SyntaxGenerator.DefaultRemoveOptions); 82var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (3)
35var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 78var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 99SyntaxGenerator generator,
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
43protected abstract SyntaxNode ChangeImplementation(SyntaxGenerator generator, SyntaxNode currentDecl, ISymbol implMember, ISymbol interfaceMember);
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (2)
126var generator = editor.Generator; 143protected override SyntaxNode ChangeImplementation(SyntaxGenerator generator, SyntaxNode decl, ISymbol implMember, ISymbol interfaceMember)
ImplementInterface\CSharpImplementImplicitlyCodeRefactoringProvider.cs (1)
48protected override SyntaxNode ChangeImplementation(SyntaxGenerator generator, SyntaxNode decl, ISymbol _1, ISymbol _2)
ReplaceConditionalWithStatements\CSharpReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
64SyntaxGenerator generator,
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (4)
64SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 117SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 235SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods, 243SemanticModel semanticModel, SyntaxGenerator generator, GetAndSetMethods getAndSetMethods)
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (4)
53SyntaxGenerator.GetGenerator(document), property, 61SyntaxGenerator generator, 105SyntaxGenerator generator, 163SyntaxGenerator generator,
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
273var generator = editor.Generator;
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (4)
28protected virtual AccessorDeclarationSyntax? GenerateGetAccessorDeclaration(CSharpSyntaxContext syntaxContext, SyntaxGenerator generator, CancellationToken cancellationToken) 31protected virtual AccessorDeclarationSyntax? GenerateSetAccessorDeclaration(CSharpSyntaxContext syntaxContext, SyntaxGenerator generator, CancellationToken cancellationToken) 46var generator = SyntaxGenerator.GetGenerator(document);
Snippets\AbstractCSharpForLoopSnippetProvider.cs (4)
36protected abstract ExpressionSyntax GenerateInitializerValue(SyntaxGenerator generator, SyntaxNode? inlineExpression); 38protected abstract ExpressionSyntax GenerateRightSideOfCondition(SyntaxGenerator generator, SyntaxNode? inlineExpression); 45protected override ForStatementSyntax GenerateStatement(SyntaxGenerator generator, SyntaxContext syntaxContext, InlineExpressionInfo? inlineExpressionInfo) 69static (TypeSyntax iteratorTypeSyntax, SyntaxNode? inlineExpression) GetLoopHeaderParts(SyntaxGenerator generator, InlineExpressionInfo? inlineExpressionInfo, Compilation compilation)
Snippets\CSharpClassSnippetProvider.cs (2)
47var generator = SyntaxGenerator.GetGenerator(document);
Snippets\CSharpConstructorSnippetProvider.cs (2)
70var generator = SyntaxGenerator.GetGenerator(document);
Snippets\CSharpDoWhileLoopSnippetProvider.cs (1)
33protected override DoStatementSyntax GenerateStatement(SyntaxGenerator generator, SyntaxContext syntaxContext, InlineExpressionInfo? inlineExpressionInfo)
Snippets\CSharpEnumSnippetProvider.cs (2)
44var generator = SyntaxGenerator.GetGenerator(document);
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
58protected override ForEachStatementSyntax GenerateStatement(SyntaxGenerator generator, SyntaxContext syntaxContext, InlineExpressionInfo? inlineExpressionInfo)
Snippets\CSharpForLoopSnippetProvider.cs (2)
29protected override ExpressionSyntax GenerateInitializerValue(SyntaxGenerator generator, SyntaxNode? inlineExpression) 32protected override ExpressionSyntax GenerateRightSideOfCondition(SyntaxGenerator generator, SyntaxNode? inlineExpression)
Snippets\CSharpInterfaceSnippetProvider.cs (2)
43var generator = SyntaxGenerator.GetGenerator(document);
Snippets\CSharpIntMainSnippetProvider.cs (2)
30protected override TypeSyntax GenerateReturnType(SyntaxGenerator generator) 33protected override IEnumerable<StatementSyntax> GenerateInnerStatements(SyntaxGenerator generator)
Snippets\CSharpPropgSnippetProvider.cs (1)
26protected override AccessorDeclarationSyntax? GenerateSetAccessorDeclaration(CSharpSyntaxContext syntaxContext, SyntaxGenerator generator, CancellationToken cancellationToken)
Snippets\CSharpPropiSnippetProvider.cs (1)
28protected override AccessorDeclarationSyntax? GenerateSetAccessorDeclaration(CSharpSyntaxContext syntaxContext, SyntaxGenerator generator, CancellationToken cancellationToken)
Snippets\CSharpProprSnippetProvider.cs (1)
53protected override AccessorDeclarationSyntax? GenerateSetAccessorDeclaration(CSharpSyntaxContext syntaxContext, SyntaxGenerator generator, CancellationToken cancellationToken)
Snippets\CSharpPropSnippetProvider.cs (1)
26protected override AccessorDeclarationSyntax? GenerateSetAccessorDeclaration(CSharpSyntaxContext syntaxContext, SyntaxGenerator generator, CancellationToken cancellationToken)
Snippets\CSharpReversedForLoopSnippetProvider.cs (2)
29protected override ExpressionSyntax GenerateInitializerValue(SyntaxGenerator generator, SyntaxNode? inlineExpression) 35protected override ExpressionSyntax GenerateRightSideOfCondition(SyntaxGenerator generator, SyntaxNode? inlineExpression)
Snippets\CSharpStructSnippetProvider.cs (2)
45var generator = SyntaxGenerator.GetGenerator(document);
Snippets\CSharpVoidMainSnippetProvider.cs (2)
30protected override TypeSyntax GenerateReturnType(SyntaxGenerator generator) 33protected override IEnumerable<StatementSyntax> GenerateInnerStatements(SyntaxGenerator generator)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
155SyntaxGenerator generator, ImmutableArray<IParameterSymbol> unassignedParameters)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAboveReturnCodeFixProvider.cs (1)
46var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AssignOutParametersAtStartCodeFixProvider.cs (1)
60var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (2)
80var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
93SyntaxGenerator g, INamedTypeSymbol classType, string disposeMethodDisplayString)
src\Analyzers\CSharp\CodeFixes\MakeAnonymousFunctionStatic\CSharpMakeAnonymousFunctionStaticCodeFixProvider.cs (1)
40var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
200public static SyntaxNode AddStaticModifier(SyntaxNode localFunction, SyntaxGenerator generator)
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
110var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (2)
69var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\CSharp\CodeFixes\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyCodeFixProvider.cs (1)
41var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\PopulateSwitch\CSharpPopulateSwitchExpressionCodeFixProvider.cs (4)
30protected override SwitchExpressionArmSyntax CreateDefaultSwitchArm(SyntaxGenerator generator, Compilation compilation) 33protected override SwitchExpressionArmSyntax CreateSwitchArm(SyntaxGenerator generator, Compilation compilation, MemberAccessExpressionSyntax caseLabel) 36protected override SwitchExpressionArmSyntax CreateNullSwitchArm(SyntaxGenerator generator, Compilation compilation) 39protected override SwitchExpressionSyntax InsertSwitchArms(SyntaxGenerator generator, SwitchExpressionSyntax switchNode, int insertLocation, List<SwitchExpressionArmSyntax> newArms)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (2)
51protected override SyntaxNode RemoveAsyncModifier(SyntaxGenerator generator, SyntaxNode methodLikeNode) 63private static SyntaxNode AnnotateBlock(SyntaxGenerator generator, SyntaxNode node)
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
64var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
60var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (2)
44var generator = context.Document.GetRequiredLanguageService<SyntaxGenerator>(); 58SyntaxGenerator generator,
src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (1)
38var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (2)
82var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\CSharp\CodeFixes\UseIndexOrRangeOperator\CSharpUseRangeOperatorCodeFixProvider.cs (6)
53var syntaxGenerator = SyntaxGenerator.GetGenerator(document); 66SyntaxGenerator generator, 84private static ExpressionSyntax FixOne(Result result, SyntaxGenerator generator) 124private static RangeExpressionSyntax CreateRangeExpression(Result result, SyntaxGenerator generator) 234private static RangeExpressionSyntax CreateConstantRange(Result result, SyntaxGenerator generator)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
193return SyntaxGenerator.GetGenerator(document).CastExpression(delegateType, reference);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (3)
222if (constructorRemoveOptions == SyntaxGenerator.DefaultRemoveOptions) 235if (memberRemoveOptions != SyntaxGenerator.DefaultRemoveOptions) 554: SyntaxGenerator.DefaultRemoveOptions;
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
97var generator = editor.Generator;
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
43var generator = editor.Generator;
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (2)
92var generator = SyntaxGenerator.GetGenerator(project);
Wrapping\SeparatedSyntaxList\CSharpParameterWrapper.cs (1)
58var generator = CSharpSyntaxGenerator.Instance;
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
28[ExportLanguageService(typeof(SyntaxGenerator), LanguageNames.CSharp), Shared] 102public static readonly SyntaxGenerator Instance = new CSharpSyntaxGenerator();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationContextInfo.cs (2)
25protected override SyntaxGenerator GeneratorImpl 26=> Service.LanguageServices.GetRequiredService<SyntaxGenerator>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpAddImportsService.cs (1)
36protected override ImmutableArray<SyntaxNode> GetGlobalImports(Compilation compilation, SyntaxGenerator generator)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (1)
183public override SyntaxNode NegateEquality(SyntaxGenerator generator, SyntaxNode binaryExpression, SyntaxNode left, BinaryOperatorKind negatedKind, SyntaxNode right)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\CSharpInitializeParameterService.cs (1)
54var generator = editor.Generator;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (10)
CodeGeneration\SymbolEditorTests.cs (3)
26private SyntaxGenerator _g; 28private SyntaxGenerator Generator 29=> _g ??= SyntaxGenerator.GetGenerator(new AdhocWorkspace(), LanguageNames.CSharp);
CodeGeneration\SyntaxGeneratorTests.cs (3)
33private SyntaxGenerator _generator; 38private SyntaxGenerator Generator 39=> _generator ??= SyntaxGenerator.GetGenerator(Workspace, LanguageNames.CSharp);
Formatting\FormattingElasticTriviaTests.cs (2)
109var generator = SyntaxGenerator.GetGenerator(workspace, LanguageNames.CSharp);
Formatting\FormattingTreeEditTests.cs (2)
38var g = SyntaxGenerator.GetGenerator(document);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
CodeGeneration\AbstractCodeGenerationTests.cs (6)
50private static SyntaxNode WrapExpressionInBoilerplate(SyntaxNode expression, SyntaxGenerator codeDefFactory) 70Func<SyntaxGenerator, SyntaxNode> nodeCreator, 81var codeDefFactory = workspace.Services.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<SyntaxGenerator>(); 102var codeDefFactory = workspace.Services.GetLanguageServices(LanguageNames.VisualBasic).GetRequiredService<SyntaxGenerator>();
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (2)
AddPackage\AspNetCoreAddPackageCodeAction.cs (2)
59var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 76private static async Task<Document> AddImportAsync(Document document, int position, SyntaxGenerator generator, SyntaxNode importDirective, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (263)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (1)
74var factory = _document.GetRequiredLanguageService<SyntaxGenerator>();
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
119var generator = editor.Generator;
AddFileBanner\AbstractAddFileBannerNewDocumentFormattingProvider.cs (1)
18protected abstract SyntaxGenerator SyntaxGenerator { get; }
AddImport\References\Reference.cs (2)
86var generator = SyntaxGenerator.GetGenerator(document);
ChangeSignature\AbstractChangeSignatureService.cs (1)
91protected abstract SyntaxGenerator Generator { get; }
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (2)
114var generator = SyntaxGenerator.GetGenerator(document);
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (1)
51var generator = editor.Generator;
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (6)
401var generator = SyntaxGenerator.GetGenerator(document); 409private static SyntaxNode CreateImport(SyntaxGenerator syntaxGenerator, string name, bool withFormatterAnnotation) 695var generator = SyntaxGenerator.GetGenerator(document); 827var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (2)
118var syntaxGenerator = SyntaxGenerator.GetGenerator(document);
Completion\Providers\AbstractAwaitCompletionProvider.cs (1)
105var makeContainerAsync = declaration is not null && !SyntaxGenerator.GetGenerator(document).GetModifiers(declaration).IsAsync;
Completion\Providers\AbstractOverrideCompletionProvider.cs (1)
53var syntaxFactory = document.GetRequiredLanguageService<SyntaxGenerator>();
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
65var syntaxFactory = document.GetRequiredLanguageService<SyntaxGenerator>();
Completion\Providers\ImportCompletionProvider\ImportCompletionProviderHelpers.cs (3)
31var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 36var syntaxGenerator = SyntaxGenerator.GetGenerator(document);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (5)
107var generator = SyntaxGenerator.GetGenerator(document); 247var generator = SyntaxGenerator.GetGenerator(document); 378ImmutableArray<IPropertySymbol> properties, SyntaxGenerator generator)
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
110var editor = new SyntaxEditor(root, SyntaxGenerator.GetGenerator(document));
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (2)
26TCodeGenerationContextInfo info, TPropertyDeclarationNode property, string fieldName, SyntaxGenerator generator, CancellationToken cancellationToken); 82var generator = editor.Generator;
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (3)
90SemanticModel model, SyntaxGenerator generator, 113var generator = editor.Generator; 132SyntaxGenerator generator, SyntaxNode type, SyntaxToken foreachVariable,
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (3)
321var generator = SyntaxGenerator.GetGenerator(document); 373SyntaxGenerator.DefaultRemoveOptions | SyntaxRemoveOptions.KeepLeadingTrivia);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (3)
38var generator = SyntaxGenerator.GetGenerator(document); 60private SyntaxNode AsSwitchSectionSyntax(AnalyzedSwitchSection section, SyntaxGenerator generator, Feature feature)
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (2)
123var generator = SyntaxGenerator.GetGenerator(document);
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (5)
36var generator = SyntaxGenerator.GetGenerator(document); 137var generator = SyntaxGenerator.GetGenerator(document); 256private static SyntaxNode ConcatenateTextToTextNode(SyntaxGenerator generator, SyntaxNode interpolatedStringTextNode, string textWithoutQuotes, string value)
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
238var syntaxGenerator = document.GetRequiredLanguageService<SyntaxGenerator>();
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (4)
63var generator = SyntaxGenerator.GetGenerator(document); 92var generator = SyntaxGenerator.GetGenerator(document);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (13)
343var generator = project.Services.GetRequiredService<SyntaxGenerator>(); 404SyntaxGenerator generator, string structName, 562var generator = SyntaxGenerator.GetGenerator(document); 717private SeparatedSyntaxList<TArgumentSyntax> ConvertArguments(SyntaxGenerator generator, NamingRule parameterNamingRule, bool isRecord, SeparatedSyntaxList<TArgumentSyntax> arguments) 720private SyntaxNodeOrTokenList ConvertArguments(SyntaxGenerator generator, NamingRule parameterNamingRule, bool isRecord, SyntaxNodeOrTokenList list) 723private SyntaxNodeOrToken ConvertArgumentOrToken(SyntaxGenerator generator, NamingRule parameterNamingRule, bool isRecord, SyntaxNodeOrToken arg) 729SyntaxGenerator generator, NamingRule parameterNamingRule, bool isRecord, TArgumentSyntax argument) 815var generator = SyntaxGenerator.GetGenerator(document); 854SemanticModel model, SyntaxGenerator generator, 880SyntaxGenerator generator, ArrayBuilder<ISymbol> members, 923ImmutableArray<IFieldSymbol> fields, SyntaxGenerator generator,
EncapsulateField\AbstractEncapsulateFieldService.cs (3)
344var factory = document.GetRequiredLanguageService<SyntaxGenerator>(); 377protected static IMethodSymbol CreateSet(string originalFieldName, IFieldSymbol field, SyntaxGenerator factory) 396protected static IMethodSymbol CreateGet(string originalFieldName, IFieldSymbol field, SyntaxGenerator factory)
ExtractClass\ExtractClassWithDialogCodeAction.cs (2)
248var syntaxGenerator = SyntaxGenerator.GetGenerator(document);
ExtractInterface\AbstractExtractInterfaceService.cs (2)
339var syntaxGenerator = SyntaxGenerator.GetGenerator(document);
ExtractMethod\MethodExtractor.CodeGenerator.cs (7)
278var generator = this.SemanticDocument.GetRequiredLanguageService<SyntaxGenerator>(); 284var generator = this.SemanticDocument.GetRequiredLanguageService<SyntaxGenerator>(); 368var generator = this.SemanticDocument.GetRequiredLanguageService<SyntaxGenerator>(); 462var generator = this.SemanticDocument.Document.GetRequiredLanguageService<SyntaxGenerator>();
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (4)
144var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 159SyntaxGenerator generator, 175SyntaxGenerator generator, 209SyntaxGenerator generator, CodeGenerationOperatorKind kind, SyntaxNode leftExpression)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (1)
46var factory = languageServices.GetRequiredService<SyntaxGenerator>();
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.FieldDelegatingCodeAction.cs (1)
44var factory = _document.GetRequiredLanguageService<SyntaxGenerator>();
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (6)
44var generator = document.GetLanguageService<SyntaxGenerator>(); 55var generator = document.GetLanguageService<SyntaxGenerator>(); 66var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 122var factory = document.GetRequiredLanguageService<SyntaxGenerator>(); 128SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, 148SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation,
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (4)
80var generator = _document.GetRequiredLanguageService<SyntaxGenerator>(); 129var generator = _document.GetRequiredLanguageService<SyntaxGenerator>(); 143SyntaxGenerator generator, 170private static IMethodSymbol CreateInequalityOperator(Compilation compilation, SyntaxGenerator generator, ImmutableArray<IParameterSymbol> parameters)
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (3)
66var generator = SyntaxGenerator.GetGenerator(_document); 90SyntaxGenerator generator, ISymbol symbol,
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (3)
162var factory = _semanticDocument.Document.GetLanguageService<SyntaxGenerator>(); 188var factory = _semanticDocument.Document.GetLanguageService<SyntaxGenerator>(); 236var factory = _semanticDocument.Document.GetLanguageService<SyntaxGenerator>();
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (11)
143var generator = SyntaxGenerator.GetGenerator(document); 356Func<SemanticModel, SyntaxGenerator, TStatementSyntax> generateNullCheck, 385private TStatementSyntax CreateNullCheckStatement(SemanticModel semanticModel, SyntaxGenerator generator, IParameterSymbol parameter, TSimplifierOptions options) 392Compilation compilation, SyntaxGenerator generator, IParameterSymbol parameter, string methodName, TSimplifierOptions options) 521var generator = SyntaxGenerator.GetGenerator(document); 541Compilation compilation, SyntaxGenerator generator, Type type) 555Compilation compilation, SyntaxGenerator generator, IParameterSymbol parameter) 563Compilation compilation, SyntaxGenerator generator, IParameterSymbol parameter, string methodName) 614private static SyntaxNode InterpolatedStringText(SyntaxGenerator generator, string content, string value)
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
483var generator = editor.Generator;
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (2)
69var generator = SyntaxGenerator.GetGenerator(document);
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (3)
376var syntaxGenerator = SyntaxGenerator.GetGenerator(document); 426SyntaxGenerator syntaxGenerator,
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (6)
52var syntaxGenerator = SyntaxGenerator.GetGenerator(document); 248SyntaxGenerator syntaxGenerator, 276SyntaxGenerator syntaxGenerator, 288SyntaxGenerator syntaxGenerator, 326SyntaxGenerator syntaxGenerator,
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (3)
165var syntaxGenerator = SyntaxGenerator.GetGenerator(document); 496SyntaxGenerator syntaxGenerator,
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (2)
59var generator = SyntaxGenerator.GetGenerator(document);
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (5)
34private readonly SyntaxGenerator _generator = SyntaxGenerator.GetGenerator(originalDocument); 388private async Task<SyntaxNode> ExtractMethodAsync(ImmutableArray<IParameterSymbol> validParameters, string newMethodIdentifier, SyntaxGenerator generator, CancellationToken cancellationToken) 420private async Task<SyntaxNode> GenerateNewMethodOverloadAsync(int insertionIndex, SyntaxGenerator generator, CancellationToken cancellationToken) 631var generator = editor.Generator;
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (2)
87var generator = SyntaxGenerator.GetGenerator(document);
IntroduceVariable\AbstractIntroduceVariableService.cs (2)
384var generator = SyntaxGenerator.GetGenerator(originalDocument.Document);
IntroduceVariable\AbstractIntroduceVariableService.State.cs (2)
224var generator = SyntaxGenerator.GetGenerator(document.Document);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (1)
299var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
InvertLogical\AbstractInvertLogicalCodeRefactoringProvider.cs (4)
105var generator = SyntaxGenerator.GetGenerator(document); 130var generator = SyntaxGenerator.GetGenerator(document);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (1)
267var generator = docEditor.Generator;
PreferFrameworkType\PreferFrameworkTypeCodeFixProvider.cs (1)
50var generator = editor.Generator;
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
133var removeOptions = SyntaxGenerator.DefaultRemoveOptions;
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (6)
43protected abstract TLocalDeclarationStatementSyntax GetUpdatedLocalDeclarationStatement(SyntaxGenerator generator, TLocalDeclarationStatementSyntax localDeclarationStatement, ILocalSymbol symbol); 204var generator = SyntaxGenerator.GetGenerator(document); 229var generator = SyntaxGenerator.GetGenerator(document); 266SyntaxGenerator generator,
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (2)
50var generator = SyntaxGenerator.GetGenerator(document);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (3)
39protected static SyntaxNode GetFieldReference(SyntaxGenerator generator, IFieldSymbol propertyBackingField) 185private static readonly Func<SyntaxNode, SyntaxGenerator, ReplaceParentArgs, SyntaxNode> replaceParentCallback = 201private SyntaxGenerator Generator => _editor.Generator;
Shared\Utilities\ExtractTypeHelpers.cs (2)
125var syntaxGenerator = SyntaxGenerator.GetGenerator(document);
Snippets\SnippetProviders\AbstractConsoleSnippetProvider.cs (2)
42var generator = SyntaxGenerator.GetGenerator(document);
Snippets\SnippetProviders\AbstractIfSnippetProvider.cs (1)
18protected sealed override TIfStatementSyntax GenerateStatement(SyntaxGenerator generator, SyntaxContext syntaxContext, InlineExpressionInfo? inlineExpressionInfo)
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (2)
36protected abstract TStatementSyntax GenerateStatement(SyntaxGenerator generator, SyntaxContext syntaxContext, InlineExpressionInfo? inlineExpressionInfo); 68var statement = GenerateStatement(SyntaxGenerator.GetGenerator(document), syntaxContext, inlineExpressionInfo);
Snippets\SnippetProviders\AbstractLockSnippetProvider.cs (2)
17var generator = SyntaxGenerator.GetGenerator(document);
Snippets\SnippetProviders\AbstractMainMethodSnippetProvider.cs (4)
20protected abstract TTypeSyntax GenerateReturnType(SyntaxGenerator generator); 22protected abstract IEnumerable<TStatementSyntax> GenerateInnerStatements(SyntaxGenerator generator); 26var generator = SyntaxGenerator.GetGenerator(document);
Snippets\SnippetProviders\AbstractWhileLoopSnippetProvider.cs (1)
15protected sealed override TWhileStatementSyntax GenerateStatement(SyntaxGenerator generator, SyntaxContext syntaxContext, InlineExpressionInfo? inlineExpressionInfo)
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
85var generator = document.GetLanguageService<SyntaxGenerator>();
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
65var generator = document.GetLanguageService<SyntaxGenerator>();
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
73var generator = document.GetLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
31var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
86var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
115var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
48var syntaxGenerator = document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
86SyntaxGenerator generator,
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (3)
438var delegatingArguments = this.GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateArguments(_delegatedConstructor.Parameters); 476: GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateAssignmentStatements( 503GetRequiredLanguageService<SyntaxGenerator>(TypeToGenerateIn.Language).CreateMemberDelegatingConstructor(
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
54var syntaxFactory = _document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
67var syntaxFactory = _document.Project.Solution.Services.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (3)
71SyntaxGenerator factory, 97SyntaxGenerator factory, 197SyntaxGenerator factory,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
88var syntaxFactory = destinationProvider.GetService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
116var syntaxFactory = _semanticDocument.Project.Solution.Services.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
56var syntaxFactory = _document.GetLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (5)
180var generator = SyntaxGenerator.GetGenerator(_document); 208var generator = _document.GetRequiredLanguageService<Microsoft.CodeAnalysis.Editing.SyntaxGenerator>(); 240var generator = _document.GetRequiredLanguageService<Microsoft.CodeAnalysis.Editing.SyntaxGenerator>(); 254var generator = _document.GetRequiredLanguageService<Microsoft.CodeAnalysis.Editing.SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (1)
35protected abstract SyntaxNode CreateFinalizer(SyntaxGenerator generator, INamedTypeSymbol classType, string disposeMethodDisplayString);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (3)
295var factory = Document.GetRequiredLanguageService<SyntaxGenerator>(); 312private ISymbol GenerateEvent(Compilation compilation, string memberName, bool generateInvisibly, SyntaxGenerator factory, DeclarationModifiers modifiers, bool useExplicitInterfaceSymbol, Accessibility accessibility, IEventSymbol @event) 335var generator = Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (4)
106var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 129var g = this.Document.GetRequiredLanguageService<SyntaxGenerator>(); 148var g = this.Document.GetRequiredLanguageService<SyntaxGenerator>(); 193var g = this.Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (1)
54var factory = Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (3)
40var factory = Document.GetLanguageService<SyntaxGenerator>(); 163var generator = Document.GetRequiredLanguageService<SyntaxGenerator>(); 178var generator = Document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
59var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\MakeMemberStatic\AbstractMakeMemberStaticCodeFixProvider.cs (2)
41var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
32var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (5)
43protected abstract TSwitchArmSyntax CreateSwitchArm(SyntaxGenerator generator, Compilation compilation, TMemberAccessExpression caseLabel); 44protected abstract TSwitchArmSyntax CreateNullSwitchArm(SyntaxGenerator generator, Compilation compilation); 45protected abstract TSwitchArmSyntax CreateDefaultSwitchArm(SyntaxGenerator generator, Compilation compilation); 47protected abstract TSwitchSyntax InsertSwitchArms(SyntaxGenerator generator, TSwitchSyntax switchNode, int insertLocation, List<TSwitchArmSyntax> newArms); 173var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
52protected static TExpressionSyntax Exception(SyntaxGenerator generator, Compilation compilation)
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchStatementCodeFixProvider.cs (4)
68protected sealed override TSwitchSyntax InsertSwitchArms(SyntaxGenerator generator, TSwitchSyntax switchNode, int insertLocation, List<TSwitchArmSyntax> newArms) 71protected sealed override TSwitchArmSyntax CreateDefaultSwitchArm(SyntaxGenerator generator, Compilation compilation) 74protected sealed override TSwitchArmSyntax CreateSwitchArm(SyntaxGenerator generator, Compilation compilation, TMemberAccessExpression caseLabel) 77protected override TSwitchArmSyntax CreateNullSwitchArm(SyntaxGenerator generator, Compilation compilation)
src\Analyzers\Core\CodeFixes\QualifyMemberAccess\AbstractQualifyMemberAccessCodeFixProvider.cs (1)
39var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (10)
26protected abstract SyntaxNode RemoveAsyncModifier(SyntaxGenerator generator, SyntaxNode methodLikeNode); 68var generator = editor.Generator; 120SyntaxGenerator generator, 166private static ControlFlowAnalysis? GetControlFlowAnalysis(SyntaxGenerator generator, SemanticModel semanticModel, SyntaxNode node) 177private static SyntaxNode AddReturnStatement(SyntaxGenerator generator, SyntaxNode node) 183SyntaxGenerator generator, 214private static SyntaxNode GetReturnTaskCompletedTaskStatement(SyntaxGenerator generator, ITypeSymbol returnType, KnownTaskTypes knownTypes) 231private static SyntaxNode WrapExpressionWithTaskFromResult(SyntaxGenerator generator, SyntaxNode expression, ITypeSymbol returnType, KnownTaskTypes knownTypes) 249private static SyntaxNode TypeExpressionForStaticMemberAccess(SyntaxGenerator generator, INamedTypeSymbol typeSymbol) 258static SyntaxNode QualifiedNameToMemberAccess(int qualifiedNameSyntaxKind, int memberAccessExpressionSyntaxKind, SyntaxNode expression, SyntaxGenerator generator)
src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
39var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\RemoveUnnecessarySuppressions\RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (1)
75var options = SyntaxGenerator.DefaultRemoveOptions;
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
647var removeOptions = SyntaxGenerator.DefaultRemoveOptions; 903var rootWithRemovedDeclaration = root.RemoveNode(newDecl, SyntaxGenerator.DefaultRemoveOptions | SyntaxRemoveOptions.KeepLeadingTrivia);
src\Analyzers\Core\CodeFixes\SimplifyBooleanExpression\SimplifyConditionalCodeFixProvider.cs (2)
41var generator = SyntaxGenerator.GetGenerator(document);
src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
54var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
67var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
40var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
46var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
93ISyntaxFactsService syntaxFacts, SyntaxGenerator generator,
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (3)
90var generator = SyntaxGenerator.GetGenerator(document); 158SyntaxGenerator generator, IOperation statement, IOperation value)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
107var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseConditionalExpression\UseConditionalExpressionHelpers.cs (1)
18var removeOptions = SyntaxGenerator.DefaultRemoveOptions;
src\Analyzers\Core\CodeFixes\UseExplicitTupleName\UseExplicitTupleNameCodeFixProvider.cs (1)
38var generator = editor.Generator;
src\Analyzers\Core\CodeFixes\UseSystemHashCode\UseSystemHashCodeCodeFixProvider.cs (2)
39var generator = SyntaxGenerator.GetGenerator(document);
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
311var syntaxRemoveOptions = SyntaxGenerator.DefaultRemoveOptions;
Wrapping\AbstractCodeActionComputer.cs (2)
74var generator = SyntaxGenerator.GetGenerator(document);
Wrapping\BinaryExpression\BinaryExpressionCodeActionComputer.cs (2)
57var generator = SyntaxGenerator.GetGenerator(document);
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (2)
77var generator = SyntaxGenerator.GetGenerator(document);
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (2)
89var generator = SyntaxGenerator.GetGenerator(OriginalDocument);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (11)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
108g As SyntaxGenerator,
src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\VisualBasicRemoveAsyncModifierCodeFixProvider.vb (1)
34Protected Overrides Function RemoveAsyncModifier(generator As SyntaxGenerator, methodLikeNode As SyntaxNode) As SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\AttributeGenerator.vb (1)
44Private Function GenerateArgumentList(generator As SyntaxGenerator, attribute As AttributeData) As ArgumentListSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (2)
18Public Function GenerateExpression(generator As SyntaxGenerator, typedConstant As TypedConstant) As ExpressionSyntax 42Friend Function GenerateExpression(generator As SyntaxGenerator, type As ITypeSymbol, value As Object, canUseFieldReference As Boolean) As ExpressionSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (1)
94Private Function GenerateEqualsValue(generator As SyntaxGenerator, field As IFieldSymbol) As EqualsValueSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
91Private Shared Function GenerateEqualsValue(generator As SyntaxGenerator, parameter As IParameterSymbol, seenOptional As Boolean) As EqualsValueSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationContextInfo.vb (2)
33Protected Overrides ReadOnly Property GeneratorImpl As SyntaxGenerator 35Return _service.LanguageServices.GetRequiredService(Of SyntaxGenerator)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicAddImportsService.vb (1)
51Protected Overrides Function GetGlobalImports(compilation As Compilation, generator As SyntaxGenerator) As ImmutableArray(Of SyntaxNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
156Public Overrides Function NegateEquality(generator As SyntaxGenerator, node As SyntaxNode, left As SyntaxNode, negatedKind As Operations.BinaryOperatorKind, right As SyntaxNode) As SyntaxNode
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
221Dim syntaxFactory = document.GetLanguageService(Of SyntaxGenerator)()
Microsoft.CodeAnalysis.VisualBasic.Features (17)
AddFileBanner\VisualBasicAddFileBannerNewDocumentFormattingProvider.vb (1)
24Protected Overrides ReadOnly Property SyntaxGenerator As SyntaxGenerator = VisualBasicSyntaxGenerator.Instance
AddImport\VisualBasicAddImportFeatureService.vb (2)
199Dim generator = SyntaxGenerator.GetGenerator(document) 299Dim generator = SyntaxGenerator.GetGenerator(document)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
749Protected Overrides ReadOnly Property Generator As SyntaxGenerator
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (1)
185Dim gen = document.GetLanguageService(Of SyntaxGenerator)()
ConvertAutoPropertyToFullProperty\VisualBasicConvertAutoPropertyToFullProperty.vb (1)
39generator As SyntaxGenerator,
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
121generator As SyntaxGenerator, foreachInfo As ForEachInfo,
RemoveSharedFromModuleMembers\VisualBasicRemoveSharedFromModuleMembersCodeFixProvider.vb (1)
73Dim generator = SyntaxGenerator.GetGenerator(document)
ReplaceConditionalWithStatementsCodeRefactoringProvider\VisualBasicReplaceConditionalWithStatementsCodeRefactoringProvider.vb (1)
56generator As SyntaxGenerator,
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
155Function(c As SyntaxNode, g As SyntaxGenerator)
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (4)
41SyntaxGenerator.GetGenerator(document), [property], 48generator As SyntaxGenerator, 80generator As SyntaxGenerator, 113generator As SyntaxGenerator,
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
108g As SyntaxGenerator,
src\Analyzers\VisualBasic\CodeFixes\RemoveAsyncModifier\VisualBasicRemoveAsyncModifierCodeFixProvider.vb (1)
34Protected Overrides Function RemoveAsyncModifier(generator As SyntaxGenerator, methodLikeNode As SyntaxNode) As SyntaxNode
UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (1)
60Dim generator = SyntaxGenerator.GetGenerator(propertyDocument.Project)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (11)
CodeGeneration\VisualBasicSyntaxGenerator.vb (2)
17<ExportLanguageService(GetType(SyntaxGenerator), LanguageNames.VisualBasic), [Shared]> 21Public Shared ReadOnly Instance As SyntaxGenerator = New VisualBasicSyntaxGenerator()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\AttributeGenerator.vb (1)
44Private Function GenerateArgumentList(generator As SyntaxGenerator, attribute As AttributeData) As ArgumentListSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ExpressionGenerator.vb (2)
18Public Function GenerateExpression(generator As SyntaxGenerator, typedConstant As TypedConstant) As ExpressionSyntax 42Friend Function GenerateExpression(generator As SyntaxGenerator, type As ITypeSymbol, value As Object, canUseFieldReference As Boolean) As ExpressionSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (1)
94Private Function GenerateEqualsValue(generator As SyntaxGenerator, field As IFieldSymbol) As EqualsValueSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ParameterGenerator.vb (1)
91Private Shared Function GenerateEqualsValue(generator As SyntaxGenerator, parameter As IParameterSymbol, seenOptional As Boolean) As EqualsValueSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationContextInfo.vb (2)
33Protected Overrides ReadOnly Property GeneratorImpl As SyntaxGenerator 35Return _service.LanguageServices.GetRequiredService(Of SyntaxGenerator)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicAddImportsService.vb (1)
51Protected Overrides Function GetGlobalImports(compilation As Compilation, generator As SyntaxGenerator) As ImmutableArray(Of SyntaxNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
156Public Overrides Function NegateEquality(generator As SyntaxGenerator, node As SyntaxNode, left As SyntaxNode, negatedKind As Operations.BinaryOperatorKind, right As SyntaxNode) As SyntaxNode
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (3)
CodeGeneration\SyntaxGeneratorTests.vb (3)
17Private _g As SyntaxGenerator 27Private ReadOnly Property Generator As SyntaxGenerator 30_g = SyntaxGenerator.GetGenerator(New AdhocWorkspace(), LanguageNames.VisualBasic)
Microsoft.CodeAnalysis.Workspaces (96)
Editing\SymbolEditor.cs (1)
196.Select(n => SyntaxGenerator.GetGenerator(OriginalSolution.Workspace, n.Language).GetDeclaration(n))
Editing\SymbolEditorExtensions.cs (3)
42var gen = SyntaxGenerator.GetGenerator(doc); 60Func<SyntaxGenerator, SyntaxNode> getNewBaseType,
Editing\SyntaxEditor.cs (11)
82SyntaxGenerator.GetGenerator(services ?? throw new ArgumentNullException(nameof(services)), root.Language)) 86internal SyntaxEditor(SyntaxNode root, SyntaxGenerator generator) 98/// A <see cref="SyntaxGenerator"/> to use to create and change <see cref="SyntaxNode"/>'s. 100public SyntaxGenerator Generator { get; } 131=> RemoveNode(node, SyntaxGenerator.DefaultRemoveOptions); 150public void ReplaceNode(SyntaxNode node, Func<SyntaxNode, SyntaxGenerator, SyntaxNode> computeReplacement) 159internal void ReplaceNode(SyntaxNode node, Func<SyntaxNode, SyntaxGenerator, IEnumerable<SyntaxNode>> computeReplacement) 168internal void ReplaceNode<TArgument>(SyntaxNode node, Func<SyntaxNode, SyntaxGenerator, TArgument, SyntaxNode> computeReplacement, TArgument argument) 250public SyntaxNode Apply(SyntaxNode root, SyntaxGenerator generator) 262protected abstract SyntaxNode Apply(SyntaxNode root, SyntaxNode currentNode, SyntaxGenerator generator); 267protected override SyntaxNode Apply(SyntaxNode root, SyntaxNode currentNode, SyntaxGenerator generator)
Editing\SyntaxGenerator.cs (10)
57/// Gets the <see cref="SyntaxGenerator"/> for the specified language. 59public static SyntaxGenerator GetGenerator(Workspace workspace, string language) 63/// Gets the <see cref="SyntaxGenerator"/> for the specified language. 65internal static SyntaxGenerator GetGenerator(SolutionServices services, string language) 66=> services.GetLanguageServices(language).GetRequiredService<SyntaxGenerator>(); 69/// Gets the <see cref="SyntaxGenerator"/> for the language corresponding to the document. 71public static SyntaxGenerator GetGenerator(Document document) 75/// Gets the <see cref="SyntaxGenerator"/> for the language corresponding to the project. 77public static SyntaxGenerator GetGenerator(Project project) 78=> project.Services.GetRequiredService<SyntaxGenerator>();
Shared\Extensions\SyntaxGeneratorExtensions.cs (5)
19this SyntaxGenerator factory, 38this SyntaxGenerator codeFactory, 173private static SyntaxNode WrapWithRefIfNecessary(SyntaxGenerator codeFactory, IPropertySymbol overriddenProperty, SyntaxNode body) 193this SyntaxGenerator generator, 229this SyntaxGenerator codeFactory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContextInfo.cs (2)
24public SyntaxGenerator Generator => GeneratorImpl; 28protected abstract SyntaxGenerator GeneratorImpl { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
20SyntaxGenerator factory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\NullableSyntaxAnnotation.cs (1)
10/// Annotation placed on <see cref="ITypeSymbol"/>s that the <see cref="SyntaxGenerator"/> converts to a node. This
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
26var generator = editor.Generator;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (5)
42var generator = document.GetRequiredLanguageService<SyntaxGenerator>(); 96private static SyntaxNode GenerateNamespaceImportDeclaration(INamespaceSymbol namespaceSymbol, SyntaxGenerator generator) 109SyntaxGenerator generator, 170SyntaxGenerator generator,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (20)
31this SyntaxGenerator codeDefinitionFactory, Compilation compilation) 38this SyntaxGenerator codeDefinitionFactory, Compilation compilation) 44private static SyntaxNode CreateNewNotImplementedException(SyntaxGenerator codeDefinitionFactory, Compilation compilation) 56this SyntaxGenerator codeDefinitionFactory, Compilation compilation) 60this SyntaxGenerator factory, 67this SyntaxGenerator factory, 74this SyntaxGenerator factory, 102this SyntaxGenerator generator, IMethodSymbol method, ISymbol throughMember) 117this SyntaxGenerator generator, ISymbol member, ISymbol throughMember) 181static SyntaxNode GenerateContainerName(SyntaxGenerator factory, ISymbol throughMember) 191this SyntaxGenerator generator, 230this SyntaxGenerator generator, 343this SyntaxGenerator factory, 394this SyntaxGenerator factory, 434this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter, SyntaxNode fieldAccess) 443public static SyntaxNode CreateThrowArgumentNullExpression(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 446private static SyntaxNode CreateNewArgumentNullException(SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter) 456this SyntaxGenerator factory, 468this SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, string identifierName) 478public static SyntaxNode CreateThrowArgumentNullExceptionStatement(this SyntaxGenerator factory, Compilation compilation, IParameterSymbol parameter)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (7)
33this SyntaxGenerator factory, 65this SyntaxGenerator factory, 110SyntaxGenerator factory, 219SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, 272SyntaxGenerator factory, 323SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, Compilation compilation, ParseOptions parseOptions, SyntaxNode otherNameExpression, ArrayBuilder<SyntaxNode> expressions) 457this SyntaxGenerator factory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (6)
18this SyntaxGenerator factory, 42this SyntaxGenerator factory, SyntaxGeneratorInternal generatorInternal, 80this SyntaxGenerator factory, 179this SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, INamedTypeSymbol namedTypeSymbol, 187private static SyntaxNode CreateLiteralExpression(SyntaxGenerator factory, int value) 218SyntaxGenerator factory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (11)
36this SyntaxGenerator generator, 46this SyntaxGenerator generator, 57this SyntaxGenerator generator, 142SyntaxGenerator generator, 234SyntaxGenerator generator, 262private static SyntaxNode GetNegationOfIsPatternExpression(SyntaxNode isExpression, SyntaxGenerator generator, SyntaxGeneratorInternal generatorInternal, SemanticModel semanticModel, CancellationToken cancellationToken) 381SyntaxGenerator generator, 473SyntaxGenerator generator, 497SyntaxGenerator generator, 533SyntaxGenerator generator, 550SyntaxGenerator generator,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (3)
31protected abstract ImmutableArray<SyntaxNode> GetGlobalImports(Compilation compilation, SyntaxGenerator generator); 59SyntaxGenerator generator) 135SyntaxGenerator generator,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\IAddImportsService.cs (3)
29bool HasExistingImport(Compilation compilation, SyntaxNode root, SyntaxNode? contextLocation, SyntaxNode import, SyntaxGenerator generator); 39IEnumerable<SyntaxNode> newImports, SyntaxGenerator generator, AddImportPlacementOptions options, CancellationToken cancellationToken); 46SyntaxNode contextLocation, SyntaxNode newImport, SyntaxGenerator generator, AddImportPlacementOptions options,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
145var generator = editor.Generator;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxGeneratorInternalExtensions\SyntaxGeneratorInternal.cs (3)
15/// Internal extensions to <see cref="SyntaxGenerator"/>. 19/// made public APIs, they can be moved to <see cref="SyntaxGenerator"/>. 103public abstract SyntaxNode NegateEquality(SyntaxGenerator generator, SyntaxNode binaryExpression, SyntaxNode left, BinaryOperatorKind negatedKind, SyntaxNode right);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (2)
302var gen = SyntaxGenerator.GetGenerator(document);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2883var gen = Editing.SyntaxGenerator.GetGenerator(document);
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Editing\SyntaxEditorTests.cs (3)
227var syntaxGenerator = editor.Generator; 271var syntaxGenerator = editor.Generator; 314var syntaxGenerator = editor.Generator;
SyntaxNodeTests.cs (2)
102var gen = SyntaxGenerator.GetGenerator(doc);
Microsoft.Interop.ComInterfaceGenerator (6)
Analyzers\AddMarshalAsToElementFixer.cs (1)
49SyntaxGenerator gen = editor.Generator;
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
74var gen = editor.Generator;
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (4)
240protected static SyntaxNode AddExplicitDefaultBoolMarshalling(SyntaxGenerator generator, IMethodSymbol methodSymbol, SyntaxNode generatedDeclaration, string unmanagedTypeMemberIdentifier) 263static SyntaxNode GenerateMarshalAsUnmanagedTypeBoolAttribute(SyntaxGenerator generator, string unmanagedTypeMemberIdentifier) 271protected static SyntaxNode AddHResultStructAsErrorMarshalling(SyntaxGenerator generator, IMethodSymbol methodSymbol, SyntaxNode generatedDeclaration) 292static SyntaxNode GeneratedMarshalAsUnmanagedTypeErrorAttribute(SyntaxGenerator generator)
Microsoft.Interop.LibraryImportGenerator (13)
Analyzers\ConvertToLibraryImportFixer.cs (6)
167SyntaxGenerator generator = editor.Generator; 199SyntaxGenerator generator, 399SyntaxNode WrapInvocationWithHRExceptionThrow(SyntaxNode node, SyntaxGenerator generator) 413SyntaxGenerator generator, 552private static SyntaxNode SortDllImportAttributeArguments(AttributeSyntax attribute, SyntaxGenerator generator) 573SyntaxGenerator generator,
Analyzers\CustomMarshallerAttributeFixer.cs (3)
206SyntaxGenerator gen = editor.Generator; 402SyntaxGenerator gen = editor.Generator; 567private static SyntaxNode DefaultMethodStatement(SyntaxGenerator generator, Compilation compilation)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (4)
240protected static SyntaxNode AddExplicitDefaultBoolMarshalling(SyntaxGenerator generator, IMethodSymbol methodSymbol, SyntaxNode generatedDeclaration, string unmanagedTypeMemberIdentifier) 263static SyntaxNode GenerateMarshalAsUnmanagedTypeBoolAttribute(SyntaxGenerator generator, string unmanagedTypeMemberIdentifier) 271protected static SyntaxNode AddHResultStructAsErrorMarshalling(SyntaxGenerator generator, IMethodSymbol methodSymbol, SyntaxNode generatedDeclaration) 292static SyntaxNode GeneratedMarshalAsUnmanagedTypeErrorAttribute(SyntaxGenerator generator)
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedLanguageCodeSupport.cs (1)
170var syntaxFactory = targetDocument.GetLanguageService<SyntaxGenerator>();
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Snippets\CSharpSnippetExpansionLanguageHelper.cs (1)
95var generator = document.GetRequiredLanguageService<SyntaxGenerator>();
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexCodeFixer.cs (2)
156SyntaxGenerator generator = editor.Generator; 276static SyntaxNode? GetNode(ImmutableArray<IArgumentOperation> arguments, SyntaxGenerator generator, string parameterName)