Aracılığıyla paylaş


SemanticModel.GetSpeculativeAliasInfoCore Method

Definition

Binds the name in the context of the specified location and sees if it resolves to an alias name. If it does, return the AliasSymbol corresponding to it. Otherwise, return null.

protected:
 abstract Microsoft::CodeAnalysis::IAliasSymbol ^ GetSpeculativeAliasInfoCore(int position, Microsoft::CodeAnalysis::SyntaxNode ^ nameSyntax, Microsoft::CodeAnalysis::SpeculativeBindingOption bindingOption);
protected abstract Microsoft.CodeAnalysis.IAliasSymbol GetSpeculativeAliasInfoCore (int position, Microsoft.CodeAnalysis.SyntaxNode nameSyntax, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption);
protected abstract Microsoft.CodeAnalysis.IAliasSymbol? GetSpeculativeAliasInfoCore (int position, Microsoft.CodeAnalysis.SyntaxNode nameSyntax, Microsoft.CodeAnalysis.SpeculativeBindingOption bindingOption);
abstract member GetSpeculativeAliasInfoCore : int * Microsoft.CodeAnalysis.SyntaxNode * Microsoft.CodeAnalysis.SpeculativeBindingOption -> Microsoft.CodeAnalysis.IAliasSymbol
Protected MustOverride Function GetSpeculativeAliasInfoCore (position As Integer, nameSyntax As SyntaxNode, bindingOption As SpeculativeBindingOption) As IAliasSymbol

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.

nameSyntax
SyntaxNode

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

bindingOption
SpeculativeBindingOption

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

Returns

Remarks

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

Applies to