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