Click or drag to resize

VisualBasicExtensionsTryGetSpeculativeSemanticModelForMethodBody Method



Gets the SemanticModel for a MethodBlockBaseSyntax at a given position, used in Semantic Info for items not appearing in source code.

Namespace:  Microsoft.CodeAnalysis.VisualBasic
Assembly:  Microsoft.CodeAnalysis.VisualBasic (in Microsoft.CodeAnalysis.VisualBasic.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public static bool TryGetSpeculativeSemanticModelForMethodBody(
	this SemanticModel semanticModel,
	int position,
	MethodBlockBaseSyntax method,
	out SemanticModel speculativeModel
)

Parameters

semanticModel
Type: Microsoft.CodeAnalysisSemanticModel
position
Type: SystemInt32
method
Type: Microsoft.CodeAnalysis.VisualBasic.SyntaxMethodBlockBaseSyntax
speculativeModel
Type: Microsoft.CodeAnalysisSemanticModel

Return Value

Type: Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SemanticModel. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also