211 references to Document
Microsoft.CodeAnalysis.CodeStyle.Fixes (41)
AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
35var document = context.Document;
AbstractAddDocCommentNodesCodeFixProvider.cs (2)
32var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 44cancellationToken => AddParamTagAsync(context.Document, parentMethod, docCommentNode, cancellationToken),
AbstractAddExplicitCastCodeFixProvider.cs (1)
58var document = context.Document;
AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
36var document = context.Document;
AbstractAddParameterCodeFixProvider.cs (2)
56var document = context.Document; 233var codeFixData = PrepareCreationOfCodeActions(context.Document, arguments, methodsAndArgumentsToAdd);
AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
33var document = context.Document;
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
27var service = context.Document.Project.Solution.Services.GetRequiredService<ISupportedChangesService>(); 33cancellationToken => FixAllInDocumentAsync(context.Document, context.Diagnostics,
AbstractConflictMarkerCodeFixProvider.cs (2)
70var document = context.Document; 266var document = context.Document;
AbstractConvertToAsyncCodeFixProvider.cs (2)
32var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 41node, context.Document, diagnostic, context.CancellationToken).ConfigureAwait(false);
AbstractFileHeaderCodeFixProvider.cs (1)
38cancellationToken => GetTransformedDocumentAsync(context.Document, context.GetOptionsProvider(), cancellationToken),
AbstractIteratorCodeFixProvider.cs (2)
28var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 36var codeAction = await GetCodeFixAsync(root, node, context.Document, diagnostic, context.CancellationToken).ConfigureAwait(false);
AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
35var document = context.Document;
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
41cancellationToken => FixNodeAsync(context.Document, node, cancellationToken),
AbstractMultipleBlankLinesCodeFixProvider.cs (1)
35var document = context.Document;
AbstractOrderModifiersCodeFixProvider.cs (1)
43var syntaxTree = await context.Document.GetRequiredSyntaxTreeAsync(context.CancellationToken).ConfigureAwait(false);
AbstractPopulateSwitchCodeFixProvider.cs (1)
64var document = context.Document;
AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
31var document = context.Document;
AbstractRemoveDocCommentNodeCodeFixProvider.cs (2)
36var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 43cancellationToken => RemoveDuplicateParamTagAsync(context.Document, paramNode, cancellationToken),
AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
33c => RemoveUnnecessaryImportsAsync(context.Document, context.GetOptionsProvider(), c),
AbstractRemoveUnusedValuesCodeFixProvider.cs (3)
147if (IsForEachIterationVariableDiagnostic(diagnostic, context.Document, context.CancellationToken)) 156var syntaxFacts = context.Document.GetRequiredLanguageService<ISyntaxFactsService>(); 157var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
AbstractUnsealClassCodeFixProvider.cs (1)
31var document = context.Document;
AbstractUpgradeProjectCodeFixProvider.cs (1)
43var project = context.Document.Project;
ConsecutiveStatementPlacementCodeFixProvider.cs (1)
35var document = context.Document;
FormattingCodeFixProvider.cs (3)
65var options = await context.Document.GetCodeFixOptionsAsync(context.GetOptionsProvider(), cancellationToken).ConfigureAwait(false); 67var tree = await context.Document.GetRequiredSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 69return context.Document.WithText(await updatedTree.GetTextAsync(cancellationToken).ConfigureAwait(false));
NamingStyleCodeFixProvider.cs (1)
57var document = context.Document;
RemoveUnnecessaryAttributeSuppressionsCodeFixProvider.cs (1)
33var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (2)
38var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 39var syntaxFacts = context.Document.GetRequiredLanguageService<ISyntaxFactsService>();
SyntaxEditorBasedCodeFixProvider.cs (1)
64return cancellationToken => FixAllAsync(context.Document, diagnostics, context.GetOptionsProvider(), cancellationToken);
UpdateLegacySuppressionsCodeFixProvider.cs (1)
34var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (34)
AbstractAssignOutParametersCodeFixProvider.cs (1)
32var document = context.Document;
AddInheritdocCodeFixProvider.cs (2)
48var document = context.Document; 70semanticModel ??= await context.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ArrowExpressionClausePlacementCodeFixProvider.cs (1)
38var document = context.Document;
ConditionalExpressionPlacementCodeFixProvider.cs (1)
38var document = context.Document;
ConsecutiveBracePlacementCodeFixProvider.cs (1)
37var document = context.Document;
ConstructorInitializerPlacementCodeFixProvider.cs (1)
36var document = context.Document;
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
39var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 48c => GetChangedDocumentAsync(context.Document, conditionalExpression.SpanStart, c),
CSharpConvertToRecordCodeFixProvider.cs (1)
36var document = context.Document;
CSharpDeclareAsNullableCodeFixProvider.cs (1)
51var model = await context.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
45var document = context.Document;
CSharpFixReturnTypeCodeFixProvider.cs (1)
43var document = context.Document;
CSharpMakeMemberRequiredCodeFixProvider.cs (1)
40var document = context.Document;
CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
38var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
40var document = context.Document;
CSharpReplaceDefaultLiteralCodeFixProvider.cs (4)
45var syntaxRoot = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 52var semanticModel = await context.Document.GetRequiredSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 55context.Document, semanticModel, defaultLiteral, context.CancellationToken); 62c => ReplaceAsync(context.Document, context.Span, newExpression, c),
CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
39_ => Task.FromResult(AllowUnsafeOnProject(context.Document.Project))), context.Diagnostics);
EmbeddedStatementPlacementCodeFixProvider.cs (1)
37var document = context.Document;
HideBaseCodeFixProvider.cs (2)
35var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 49context.RegisterCodeFix(new AddNewKeywordAction(context.Document, originalNode, context.GetOptionsProvider()), context.Diagnostics);
MakeRefStructCodeFixProvider.cs (1)
43var document = context.Document;
MisplacedUsingDirectivesCodeFixProvider.cs (1)
59var document = context.Document;
PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
40context.Document,
RemoveInKeywordCodeFixProvider.cs (2)
40var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 54cancellationToken => FixAsync(context.Document, argumentSyntax, cancellationToken),
RemoveNewModifierCodeFixProvider.cs (3)
38var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 49var generator = context.Document.GetRequiredLanguageService<SyntaxGenerator>(); 56ct => FixAsync(context.Document, generator, memberDeclarationSyntax, ct),
UseExplicitTypeForConstCodeFixProvider.cs (1)
41var document = context.Document;
UseExpressionBodyForLambdaCodeFixProvider.cs (1)
37var document = context.Document;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
Diagnostics\FixAllProvider\BatchFixerTests.cs (2)
73var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 84var newDocument = context.Document.WithSyntaxRoot(newRoot);
Formatting\CodeCleanupTests.TestFixers.cs (2)
32var root = await context.Document.GetSyntaxRootAsync(cancellationToken); 40return context.Document.WithSyntaxRoot(newRoot);
Microsoft.CodeAnalysis.CSharp.Features (39)
AbstractAssignOutParametersCodeFixProvider.cs (1)
32var document = context.Document;
AddInheritdocCodeFixProvider.cs (2)
48var document = context.Document; 70semanticModel ??= await context.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ArrowExpressionClausePlacementCodeFixProvider.cs (1)
38var document = context.Document;
CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (2)
44if (context.Document.Project.IsSubmission) 49var document = context.Document;
ConditionalExpressionPlacementCodeFixProvider.cs (1)
38var document = context.Document;
ConsecutiveBracePlacementCodeFixProvider.cs (1)
37var document = context.Document;
ConstructorInitializerPlacementCodeFixProvider.cs (1)
36var document = context.Document;
ConvertProgram\ConvertToProgramMainCodeFixProvider.cs (1)
36var document = context.Document;
ConvertProgram\ConvertToTopLevelStatementsCodeFixProvider.cs (1)
38var document = context.Document;
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
39var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 48c => GetChangedDocumentAsync(context.Document, conditionalExpression.SpanStart, c),
CSharpConvertToRecordCodeFixProvider.cs (1)
36var document = context.Document;
CSharpDeclareAsNullableCodeFixProvider.cs (1)
51var model = await context.Document.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CSharpDisambiguateSameVariableCodeFixProvider.cs (1)
45var document = context.Document;
CSharpFixReturnTypeCodeFixProvider.cs (1)
43var document = context.Document;
CSharpMakeMemberRequiredCodeFixProvider.cs (1)
40var document = context.Document;
CSharpMakeStatementAsynchronousCodeFixProvider.cs (1)
38var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
40var document = context.Document;
CSharpReplaceDefaultLiteralCodeFixProvider.cs (4)
45var syntaxRoot = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 52var semanticModel = await context.Document.GetRequiredSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 55context.Document, semanticModel, defaultLiteral, context.CancellationToken); 62c => ReplaceAsync(context.Document, context.Span, newExpression, c),
CSharpUpdateProjectToAllowUnsafeCodeFixProvider.cs (1)
39_ => Task.FromResult(AllowUnsafeOnProject(context.Document.Project))), context.Diagnostics);
EmbeddedStatementPlacementCodeFixProvider.cs (1)
37var document = context.Document;
HideBaseCodeFixProvider.cs (2)
35var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 49context.RegisterCodeFix(new AddNewKeywordAction(context.Document, originalNode, context.GetOptionsProvider()), context.Diagnostics);
ImplementInterface\CSharpImplementInterfaceCodeFixProvider.cs (1)
41var document = context.Document;
MakeRefStructCodeFixProvider.cs (1)
43var document = context.Document;
MisplacedUsingDirectivesCodeFixProvider.cs (1)
59var document = context.Document;
PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
40context.Document,
RemoveInKeywordCodeFixProvider.cs (2)
40var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 54cancellationToken => FixAsync(context.Document, argumentSyntax, cancellationToken),
RemoveNewModifierCodeFixProvider.cs (3)
38var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 49var generator = context.Document.GetRequiredLanguageService<SyntaxGenerator>(); 56ct => FixAsync(context.Document, generator, memberDeclarationSyntax, ct),
UseExplicitTypeForConstCodeFixProvider.cs (1)
41var document = context.Document;
UseExpressionBodyForLambdaCodeFixProvider.cs (1)
37var document = context.Document;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeFixes\CodeFixServiceTests.cs (2)
749context.RegisterCodeFix(CodeAction.Create(_name, ct => Task.FromResult(context.Document)), fixableDiagnostics); 795ct => Task.FromResult(context.Document),
CodeFixes\ErrorCases\CodeFixExceptionInGetFixAllProvider.cs (1)
30context.RegisterCodeFix(CodeAction.Create("Do Nothing", token => Task.FromResult(context.Document)), context.Diagnostics[0]);
CodeFixes\ErrorCases\CodeFixExceptionInRegisterMethodAsync.cs (1)
25var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (7)
CodeFixes\CodeFixServiceTests.vb (6)
238Contract.ThrowIfFalse(context.Document.Project.Language = LanguageNames.CSharp) 239Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 242context.RegisterCodeFix(CodeAction.Create("FIX_TEST0000", Function(ct) Task.FromResult(context.Document.WithSyntaxRoot(root))), context.Diagnostics) 263Contract.ThrowIfFalse(context.Document.Project.Language = LanguageNames.CSharp) 264Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 267context.RegisterCodeFix(CodeAction.Create("FIX_TEST1111", Function(ct) Task.FromResult(context.Document.WithSyntaxRoot(root))), context.Diagnostics)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
115Dim project = context.Document.Project
Microsoft.CodeAnalysis.Features (58)
AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
35var document = context.Document;
AbstractAddDocCommentNodesCodeFixProvider.cs (2)
32var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 44cancellationToken => AddParamTagAsync(context.Document, parentMethod, docCommentNode, cancellationToken),
AbstractAddExplicitCastCodeFixProvider.cs (1)
58var document = context.Document;
AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
36var document = context.Document;
AbstractAddParameterCodeFixProvider.cs (2)
56var document = context.Document; 233var codeFixData = PrepareCreationOfCodeActions(context.Document, arguments, methodsAndArgumentsToAdd);
AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
33var document = context.Document;
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
27var service = context.Document.Project.Solution.Services.GetRequiredService<ISupportedChangesService>(); 33cancellationToken => FixAllInDocumentAsync(context.Document, context.Diagnostics,
AbstractConflictMarkerCodeFixProvider.cs (2)
70var document = context.Document; 266var document = context.Document;
AbstractConvertToAsyncCodeFixProvider.cs (2)
32var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 41node, context.Document, diagnostic, context.CancellationToken).ConfigureAwait(false);
AbstractFileHeaderCodeFixProvider.cs (1)
38cancellationToken => GetTransformedDocumentAsync(context.Document, context.GetOptionsProvider(), cancellationToken),
AbstractIteratorCodeFixProvider.cs (2)
28var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 36var codeAction = await GetCodeFixAsync(root, node, context.Document, diagnostic, context.CancellationToken).ConfigureAwait(false);
AbstractMakeMethodAsynchronousCodeFixProvider.cs (1)
35var document = context.Document;
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
41cancellationToken => FixNodeAsync(context.Document, node, cancellationToken),
AbstractMultipleBlankLinesCodeFixProvider.cs (1)
35var document = context.Document;
AbstractOrderModifiersCodeFixProvider.cs (1)
43var syntaxTree = await context.Document.GetRequiredSyntaxTreeAsync(context.CancellationToken).ConfigureAwait(false);
AbstractPopulateSwitchCodeFixProvider.cs (1)
64var document = context.Document;
AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
31var document = context.Document;
AbstractRemoveDocCommentNodeCodeFixProvider.cs (2)
36var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 43cancellationToken => RemoveDuplicateParamTagAsync(context.Document, paramNode, cancellationToken),
AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
33c => RemoveUnnecessaryImportsAsync(context.Document, context.GetOptionsProvider(), c),
AbstractRemoveUnusedValuesCodeFixProvider.cs (3)
147if (IsForEachIterationVariableDiagnostic(diagnostic, context.Document, context.CancellationToken)) 156var syntaxFacts = context.Document.GetRequiredLanguageService<ISyntaxFactsService>(); 157var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
AbstractUnsealClassCodeFixProvider.cs (1)
31var document = context.Document;
AbstractUpgradeProjectCodeFixProvider.cs (1)
43var project = context.Document.Project;
AddImport\AbstractAddImportCodeFixProvider.cs (1)
51var document = context.Document;
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (2)
61context.Document.Project, identity, context.CancellationToken).ConfigureAwait(false); 71var compilation = await context.Document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
AddPackage\AbstractAddPackageCodeFixProvider.cs (1)
44var document = context.Document;
CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (3)
34if (context.Document.Project.IsSubmission) 40var document = context.Document; 47var codeActions = await GetCodeActionsAsync(context.Document, name, context.Options, context.CancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\WrapperCodeFixProvider.cs (2)
35var suppressionFixes = await _suppressionFixProvider.GetFixesAsync(context.Document, context.Span, documentDiagnostics, context.Options, context.CancellationToken).ConfigureAwait(false); 42var suppressionFixes = await _suppressionFixProvider.GetFixesAsync(context.Document.Project, projectDiagnostics, context.Options, context.CancellationToken).ConfigureAwait(false);
ConsecutiveStatementPlacementCodeFixProvider.cs (1)
35var document = context.Document;
FormattingCodeFixProvider.cs (3)
65var options = await context.Document.GetCodeFixOptionsAsync(context.GetOptionsProvider(), cancellationToken).ConfigureAwait(false); 67var tree = await context.Document.GetRequiredSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 69return context.Document.WithText(await updatedTree.GetTextAsync(cancellationToken).ConfigureAwait(false));
FullyQualify\AbstractFullyQualifyCodeFixProvider.cs (1)
24var document = context.Document;
GenerateDefaultConstructors\AbstractGenerateDefaultConstructorCodeFixProvider.cs (1)
24var document = context.Document;
ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
29var document = context.Document;
NamingStyleCodeFixProvider.cs (1)
57var document = context.Document;
RemoveUnnecessaryAttributeSuppressionsCodeFixProvider.cs (1)
33var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
RemoveUnnecessaryPragmaSuppressionsCodeFixProvider.cs (2)
38var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 39var syntaxFacts = context.Document.GetRequiredLanguageService<ISyntaxFactsService>();
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
43var document = context.Document;
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (1)
77var document = context.Document;
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (3)
41var document = context.Document; 112var document = context.Document; 155var document = context.Document;
UpdateLegacySuppressionsCodeFixProvider.cs (1)
34var root = await context.Document.GetRequiredSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
75var solution = context.Document.Project.Solution;
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (2)
Formatting\CodeCleanUpTests.vb (2)
729Dim root = Await context.Document.GetSyntaxRootAsync(cancellationToken) 731Return context.Document.WithSyntaxRoot(root.RemoveNode(node.Parent, SyntaxRemoveOptions.KeepNoTrivia))
Microsoft.CodeAnalysis.VisualBasic.Features (17)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (2)
37Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 66context.RegisterCodeFix(New CorrectNextControlVariableCodeAction(context.Document, nodeToReplace, newNode), context.Diagnostics)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (4)
65Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 87Function(c) GeneratePropertyEndConstructAsync(context.Document, DirectCast(endStatement.Parent, PropertyBlockSyntax), c), 98Function(c) GeneratePropertyEndConstructAsync(context.Document, DirectCast(endStatement.Parent.Parent, PropertyBlockSyntax), c), 109Function(c) GenerateEndConstructAsync(context.Document, endStatement, c),
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
45Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 56result = Await GenerateEventFromImplementsAsync(context.Document, qualifiedName, context.Options, context.CancellationToken).ConfigureAwait(False) 61result = Await GenerateEventFromHandlesAsync(context.Document, handlesClauseItem, context.Options, context.CancellationToken).ConfigureAwait(False) 66result = Await GenerateEventFromAddRemoveHandlerAsync(context.Document, handlerStatement, context.Options, context.CancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
59Dim document = context.Document
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
41Dim document = context.Document
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
44Dim document = context.Document
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.vb (3)
37Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 49context.RegisterCodeFix(New AddKeywordAction(context.Document, token.Parent, VBFeaturesResources.Add_Overloads, SyntaxKind.OverloadsKeyword, context.Options), context.Diagnostics) 51context.RegisterCodeFix(New AddKeywordAction(context.Document, token.Parent, VBFeaturesResources.Add_Shadows, SyntaxKind.ShadowsKeyword, context.Options), context.Diagnostics)
ImplementInterface\VisualBasicImplementInterfaceCodeFixProvider.vb (1)
39Dim document = context.Document
Microsoft.CodeAnalysis.Workspaces (3)
CodeFixes\CodeFixContext.cs (2)
52/// This property should be used instead of <see cref="Document"/> property by 59/// Text span within the <see cref="Document"/> or <see cref="TextDocument"/> to fix.
SyntaxEditorBasedCodeFixProvider.cs (1)
64return cancellationToken => FixAllAsync(context.Document, diagnostics, context.GetOptionsProvider(), cancellationToken);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
104cancellationToken => CreateChangedDocument(context.Document, diagnostic.Location.SourceSpan, replacement, cancellationToken),
Microsoft.VisualStudio.LanguageServices.Xaml (1)
CodeFixes\RemoveUnnecessaryUsings\XamlRemoveUnnecessaryUsingsCodeFixProvider.cs (1)
50c => RemoveUnnecessaryImportsAsync(context.Document, c),