97 references to GetRequiredSemanticModelAsync
Microsoft.CodeAnalysis.CodeStyle.Fixes (58)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersCodeFixProvider.cs (1)
45
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
90
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddExplicitCast\AbstractAddExplicitCastCodeFixProvider.cs (1)
74
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (3)
71
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
405
var semanticModel = await invocationDocument.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
423
var semanticModel = await invocationDocument.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
41
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (1)
54
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConvertTypeOfToNameOf\AbstractConvertTypeOfToNameOfCodeFixProvider.cs (1)
38
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ForEachCast\AbstractForEachCastCodeFixProvider.cs (1)
45
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (2)
464
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
482
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
46
var semanticModel = await _document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
43
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (2)
47
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
64
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
75
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (3)
45
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
114
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
175
var semanticModel = await newDocument.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (3)
57
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
88
var semanticModel = await newDocument.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
126
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
32
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
73
var model = await document.
GetRequiredSemanticModelAsync
(context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (1)
146
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (2)
44
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
69
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveRedundantEquality\RemoveRedundantEqualityCodeFixProvider.cs (1)
41
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
48
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
301
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
919
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\SimplifyInterpolation\AbstractSimplifyInterpolationCodeFixProvider.cs (1)
50
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
35
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullStatementCheckCodeFixProvider.cs (1)
36
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
40
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
41
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
75
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
92
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
67
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
54
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
106
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
164
var semanticModel = await document.
GetRequiredSemanticModelAsync
(CancellationToken.None).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseObjectInitializer\AbstractUseObjectInitializerCodeFixProvider.cs (1)
71
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseSystemHashCode\UseSystemHashCodeCodeFixProvider.cs (1)
46
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
121
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
183
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
156
return document.
GetRequiredSemanticModelAsync
(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (1)
119
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsService.cs (2)
27
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
34
var currentModel = await current.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
102
return await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
157
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
69
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
165
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
236
semanticModelForReduce = await newDocument.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
291
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
22
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (39)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (1)
42
var semanticModel = await context.Document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (2)
37
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
98
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
72
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
40
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
86
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\DisambiguateSameVariable\CSharpDisambiguateSameVariableCodeFixProvider.cs (2)
43
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
137
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
75
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
54
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
53
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (1)
38
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
46
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\PassInCapturedVariablesAsArgumentsCodeFixProvider.cs (1)
85
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
52
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
48
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (2)
82
var model = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
167
model ??= await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
60
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
47
var semanticModel = await context.Document.
GetRequiredSemanticModelAsync
(context.CancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
64
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
44
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
52
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
40
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
44
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (2)
102
var semanticModel = await context.Document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
117
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
44
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseExpressionBody\UseExpressionBodyCodeFixProvider.cs (1)
56
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeFixProvider.cs (1)
40
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (2)
88
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
139
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UsePatternCombinators\CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
76
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
47
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpUseNotPatternCodeFixProvider.cs (1)
38
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
120
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
83
semanticModel ??= await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
46
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
41
var semanticModel = await document.
GetRequiredSemanticModelAsync
(cancellationToken).ConfigureAwait(false);