Share via


SemanticModel.GetSpeculativeSymbolInfoCore Method

Definition

Binds the node in the context of the specified location and get semantic information such as type, symbols and diagnostics. This method is used to get semantic information about an expression that did not actually appear in the source code.

protected:
 abstract Microsoft::CodeAnalysis::SymbolInfo GetSpeculativeSymbolInfoCore(int position, Microsoft::CodeAnalysis::SyntaxNode ^ expression, Microsoft::CodeAnalysis::SpeculativeBindingOption bindingOption);
protected abstract Microsoft.CodeAnalysis.SymbolInfo GetSpeculativeSymbolInfoCore (int position, Microsoft.CodeAnalysis.SyntaxNode expression, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption);
abstract member GetSpeculativeSymbolInfoCore : int * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SpeculativeBindingOption -> Microsoft.CodeAnalysis.SymbolInfo
Protected MustOverride Function GetSpeculativeSymbolInfoCore (position As Integer, expression As SyntaxNode, bindingOption As SpeculativeBindingOption) As SymbolInfo

Parameters

position
Int32

A character position used to identify a declaration scope and accessibility. This character position must be within the FullSpan of the Root syntax node in this SemanticModel.

expression
SyntaxNode

A syntax node that represents a parsed expression. This syntax node need not and typically does not appear in the source code referred to SemanticModel instance.

bindingOption
SpeculativeBindingOption

Indicates whether to binding the expression as a full expressions, or as a type or namespace. If SpeculativeBindingOption.BindAsTypeOrNamespace is supplied, then expression should derive from TypeSyntax.

Returns

The semantic information for the topmost node of the expression.

Remarks

The passed in expression is interpreted as a stand-alone expression, as if it appeared by itself somewhere within the scope that encloses "position".

Applies to