126 references to GetSemanticModelAsync
GenerateDocumentationAndConfigFiles (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (2)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 192var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (2)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ILLink.CodeFixProvider (3)
BaseAttributeCodeFixProvider.cs (1)
60if (await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false) is not { } model)
DynamicallyAccessedMembersCodeFixProvider.cs (1)
128if (await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false) is not { } model)
RequiresUnsafeCodeFixProvider.cs (1)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.Analyzers.Extra (3)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (3)
40internal Func<Document, CancellationToken, Task<SemanticModel?>> GetSemanticModelAsync = (d, t) => d.GetSemanticModelAsync(t); 140var invocationSM = (await invocationDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false))!; 577var invocationSM = (await invocationDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false))!;
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
124var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
108var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.App.CodeFixes (5)
Authorization\AddAuthorizationBuilderFixer.cs (1)
35var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\AddPackageFixer.cs (1)
37var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\ExtensionMethodsCompletionProvider.cs (1)
47var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Http\HeaderDictionaryAddFixer.cs (1)
36var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
RouteParameterUnusedParameterFixer.cs (1)
37var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
130var semanticModel = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (2)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 192var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (2)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (2)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 192var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (2)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
56var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features (12)
AddImport\CSharpAddImportFeatureService.cs (1)
369var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
50var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
190var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
43var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Debugging\CSharpProximityExpressionsService.cs (1)
63var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
EncapsulateField\CSharpEncapsulateFieldService.cs (2)
86var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 125var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\CSharpGenerateTypeService.cs (1)
545var semanticModel = await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (1)
253var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Organizing\CSharpOrganizingService.cs (1)
28var rewriter = new Rewriter(this, organizers, await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false), cancellationToken);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
56var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockFixAllProvider.cs (1)
41var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Performance\CSharpCollapseMultiplePathOperations.Fixer.cs (1)
33await document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false) is not { } semanticModel ||
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (19)
AddImport\References\SymbolReference.cs (1)
78var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
203var model = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeLens\CodeLensReferencesService.cs (4)
53var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 111var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 364var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 391var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionService.cs (2)
213var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 244var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionService_GetCompletions.cs (1)
72var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.cs (1)
276var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
280var newSemanticModel = await newDocument.GetSemanticModelAsync(_cancellationToken).ConfigureAwait(false);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
159var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (2)
77var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 96var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
79semanticModel ??= await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
219var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
150var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
221var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
61Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (1)
84Dim semanticsModel = Await propertyDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.Features (19)
ChangeSignature\VisualBasicChangeSignatureService.vb (2)
120Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 689Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (3)
77Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 252Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 319Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
53Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (1)
369Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Debugging\ProximityExpressionsGetter.vb (1)
73Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
EncapsulateField\VisualBasicEncapsulateFieldService.vb (1)
73Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
GenerateType\VisualBasicGenerateTypeService.vb (1)
421Dim semanticModel = Await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
42Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Organizing\VisualBasicOrganizerService.vb (1)
24Dim rewriter = New Rewriter(Me, organizers, Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False), cancellationToken)
SignatureHelp\AttributeSignatureHelpProvider.vb (1)
59Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\CollectionInitializerSignatureHelpProvider.vb (1)
61Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (1)
62Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (1)
69Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (1)
75Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
61Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (1)
84Dim semanticsModel = Await propertyDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (4)
Microsoft.NetCore.Analyzers\Performance\BasicPreferDictionaryTryMethodsOverContainsKeyGuardFixer.vb (1)
108Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).
Microsoft.NetCore.Analyzers\Runtime\BasicSpecifyCultureForToLowerAndToUpper.Fixer.vb (2)
36Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 52Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Microsoft.NetCore.Analyzers\Runtime\BasicUseOrdinalStringComparison.Fixer.vb (1)
47Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.Workspaces (12)
Editing\DocumentEditor.cs (1)
35var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Editing\SymbolEditor.cs (2)
294var model = await newDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 480var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Editing\SymbolEditorExtensions.cs (1)
41var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (2)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 192var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (2)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Document.cs (3)
146/// <see cref="GetSemanticModelAsync(CancellationToken)"/> method. 255/// In almost all cases, you should call <see cref="GetSemanticModelAsync(CancellationToken)"/>, which will compute the semantic model 266/// In almost all cases, you should call <see cref="GetSemanticModelAsync(CancellationToken)"/>, which will compute the semantic model
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\CustomMarshallerAttributeFixer.cs (2)
37SemanticModel model = await doc.GetSemanticModelAsync(fixAllContext.CancellationToken).ConfigureAwait(false); 156var model = await doc.GetSemanticModelAsync(ct).ConfigureAwait(false);
Microsoft.ML.InternalCodeAnalyzer (2)
ContractsCheckNameofFixProvider.cs (1)
133var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken);
NameFixProvider.cs (1)
106var semanticModel = await document.GetSemanticModelAsync(cancellationToken);
Roslyn.Diagnostics.Analyzers (15)
AbstractApplyTraitToClass`1.cs (1)
48var semanticModel = (await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false))!;
AbstractCreateTestAccessor`1.cs (2)
36var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 60var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractExposeMemberForTesting`1.cs (2)
42var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 102var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
AbstractRunIterations`1.cs (1)
31var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (2)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 161var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs (1)
34var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (2)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 192var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (2)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
TestExportsShouldNotBeDiscoverableCodeFixProvider.cs (1)
53var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Roslyn.Diagnostics.CSharp.Analyzers (3)
CSharpAvoidOptSuffixForNullableEnableCodeCodeFixProvider.cs (1)
44var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
PreferNullLiteralCodeFixProvider.cs (1)
59var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
System.Text.RegularExpressions.Generator (3)
UpgradeToGeneratedRegexCodeFixer.cs (3)
96if (await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false) is not SemanticModel semanticModel || 195await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false) is not SemanticModel semanticModel || 245if (await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false) is not SemanticModel semanticModel ||