24 references to TryGetSpeculativeSemanticModel
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
159
semanticModel.
TryGetSpeculativeSemanticModel
(position, (AttributeSyntax)nodeToSpeculate, out speculativeModel);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Attributes\AttributeTests.cs (5)
754
Assert.True(semanticModel.
TryGetSpeculativeSemanticModel
(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel));
819
Assert.True(semanticModel.
TryGetSpeculativeSemanticModel
(interpolationSyntax.Position, newAttrSyntax, out var speculativeModel));
860
Assert.True(semanticModel.
TryGetSpeculativeSemanticModel
(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel));
901
Assert.True(semanticModel.
TryGetSpeculativeSemanticModel
(attrSyntax.ArgumentList.Position, newAttrSyntax, out var speculativeModel));
940
Assert.True(semanticModel.
TryGetSpeculativeSemanticModel
(attrSyntax.Position, newAttrSyntax, out var speculativeModel));
Semantics\OutVarTests.cs (1)
36323
Assert.True(model.
TryGetSpeculativeSemanticModel
(method.Body.SpanStart + 1, method.DescendantNodes().OfType<AttributeSyntax>().Single(), out speculativeModel));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\LocalFunctionTests.cs (2)
7366
var success = parentModel.
TryGetSpeculativeSemanticModel
(localFuncPosition, attr1, out speculativeModel);
8947
var success = parentModel.
TryGetSpeculativeSemanticModel
(localFuncPosition, attr1, out speculativeModel);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\SemanticModelAPITests.cs (4)
2183
Assert.Throws<ArgumentNullException>(() => model.
TryGetSpeculativeSemanticModel
(statement.SpanStart, attribute: null, speculativeModel: out speculativeModel));
2188
Assert.Throws<ArgumentException>(() => model.
TryGetSpeculativeSemanticModel
(attribute.SpanStart, attribute: attribute, speculativeModel: out speculativeModel));
3548
model.
TryGetSpeculativeSemanticModel
(position, attr2, out model2);
3588
var success = model.
TryGetSpeculativeSemanticModel
(position, attributeSyntax, out speculativeModel);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (8)
4252
var success = parentModel.
TryGetSpeculativeSemanticModel
(position, attr1, out speculativeModel);
4263
success = parentModel.
TryGetSpeculativeSemanticModel
(position, attr2, out speculativeModel);
4281
success = parentModel.
TryGetSpeculativeSemanticModel
(position, attr3, out speculativeModel);
4302
success = parentModel.
TryGetSpeculativeSemanticModel
(position, attr4, out speculativeModel);
4313
success = parentModel.
TryGetSpeculativeSemanticModel
(position, attr5, out speculativeModel);
4326
success = parentModel.
TryGetSpeculativeSemanticModel
(position, attr6, out speculativeModel);
4349
success = parentModel.
TryGetSpeculativeSemanticModel
(position3, attr7, out speculativeModel);
4371
success = parentModel.
TryGetSpeculativeSemanticModel
(position3, attr8, out speculativeModel);
Symbols\Source\NullablePublicAPITests.cs (2)
4066
Assert.True(model.
TryGetSpeculativeSemanticModel
(localFunction.SpanStart, speculativeAttribute, out var speculativeModel));
4214
Assert.True(model.
TryGetSpeculativeSemanticModel
(attributeUsage.SpanStart, newAttributeUsage, out var specModel));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
159
semanticModel.
TryGetSpeculativeSemanticModel
(position, (AttributeSyntax)nodeToSpeculate, out speculativeModel);