Compartir a través de


CSharpExtensions.GetSymbolInfo Method

Definition

Overloads

GetSymbolInfo(SemanticModel, AttributeSyntax, CancellationToken)

Returns what symbol(s), if any, the given attribute syntax bound to in the program.

GetSymbolInfo(SemanticModel, ConstructorInitializerSyntax, CancellationToken)

Returns what symbol(s), if any, the given constructor initializer syntax bound to in the program.

GetSymbolInfo(SemanticModel, CrefSyntax, CancellationToken)

Gets the semantic information associated with a documentation comment cref.

GetSymbolInfo(SemanticModel, ExpressionSyntax, CancellationToken)

Returns what symbol(s), if any, the given expression syntax bound to in the program.

An AliasSymbol will never be returned by this method. What the alias refers to will be returned instead. To get information about aliases, call GetAliasInfo.

If binding the type name C in the expression "new C(...)" the actual constructor bound to will be returned (or all constructor if overload resolution failed). This occurs as long as C unambiguously binds to a single type that has a constructor. If C ambiguously binds to multiple types, or C binds to a static class, then type(s) are returned.

GetSymbolInfo(SemanticModel, OrderingSyntax, CancellationToken)

Gets the semantic information for an ordering clause in an orderby query clause.

GetSymbolInfo(SemanticModel, PrimaryConstructorBaseTypeSyntax, CancellationToken)

Returns what symbol(s), if any, the given constructor initializer syntax bound to in the program.

GetSymbolInfo(SemanticModel, SelectOrGroupClauseSyntax, CancellationToken)

Gets the semantic information associated with a select or group clause.

GetSymbolInfo(SemanticModel, AttributeSyntax, CancellationToken)

Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs

Returns what symbol(s), if any, the given attribute syntax bound to in the program.

public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.AttributeSyntax attributeSyntax, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.AttributeSyntax attributeSyntax, System.Threading.CancellationToken cancellationToken = default);
static member GetSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.AttributeSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetSymbolInfo (semanticModel As SemanticModel, attributeSyntax As AttributeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

Parameters

semanticModel
SemanticModel
attributeSyntax
AttributeSyntax
cancellationToken
CancellationToken

Returns

Applies to

GetSymbolInfo(SemanticModel, ConstructorInitializerSyntax, CancellationToken)

Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs

Returns what symbol(s), if any, the given constructor initializer syntax bound to in the program.

public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorInitializerSyntax constructorInitializer, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorInitializerSyntax constructorInitializer, System.Threading.CancellationToken cancellationToken = default);
static member GetSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorInitializerSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetSymbolInfo (semanticModel As SemanticModel, constructorInitializer As ConstructorInitializerSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

Parameters

semanticModel
SemanticModel
constructorInitializer
ConstructorInitializerSyntax
cancellationToken
CancellationToken

Returns

Applies to

GetSymbolInfo(SemanticModel, CrefSyntax, CancellationToken)

Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs

Gets the semantic information associated with a documentation comment cref.

public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.CrefSyntax crefSyntax, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.CrefSyntax crefSyntax, System.Threading.CancellationToken cancellationToken = default);
static member GetSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.CrefSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetSymbolInfo (semanticModel As SemanticModel, crefSyntax As CrefSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

Parameters

semanticModel
SemanticModel
crefSyntax
CrefSyntax
cancellationToken
CancellationToken

Returns

Applies to

GetSymbolInfo(SemanticModel, ExpressionSyntax, CancellationToken)

Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs

Returns what symbol(s), if any, the given expression syntax bound to in the program.

An AliasSymbol will never be returned by this method. What the alias refers to will be returned instead. To get information about aliases, call GetAliasInfo.

If binding the type name C in the expression "new C(...)" the actual constructor bound to will be returned (or all constructor if overload resolution failed). This occurs as long as C unambiguously binds to a single type that has a constructor. If C ambiguously binds to multiple types, or C binds to a static class, then type(s) are returned.

public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, System.Threading.CancellationToken cancellationToken = default);
static member GetSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetSymbolInfo (semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

Parameters

semanticModel
SemanticModel
expression
ExpressionSyntax
cancellationToken
CancellationToken

Returns

Applies to

GetSymbolInfo(SemanticModel, OrderingSyntax, CancellationToken)

Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs

Gets the semantic information for an ordering clause in an orderby query clause.

public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.OrderingSyntax node, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.OrderingSyntax node, System.Threading.CancellationToken cancellationToken = default);
static member GetSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.OrderingSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetSymbolInfo (semanticModel As SemanticModel, node As OrderingSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

Parameters

semanticModel
SemanticModel
cancellationToken
CancellationToken

Returns

Applies to

GetSymbolInfo(SemanticModel, PrimaryConstructorBaseTypeSyntax, CancellationToken)

Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs

Returns what symbol(s), if any, the given constructor initializer syntax bound to in the program.

public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.PrimaryConstructorBaseTypeSyntax constructorInitializer, System.Threading.CancellationToken cancellationToken = default);
static member GetSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.PrimaryConstructorBaseTypeSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetSymbolInfo (semanticModel As SemanticModel, constructorInitializer As PrimaryConstructorBaseTypeSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

Parameters

semanticModel
SemanticModel
constructorInitializer
PrimaryConstructorBaseTypeSyntax
cancellationToken
CancellationToken

Returns

Applies to

GetSymbolInfo(SemanticModel, SelectOrGroupClauseSyntax, CancellationToken)

Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs
Source:
CSharpExtensions.cs

Gets the semantic information associated with a select or group clause.

public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.SelectOrGroupClauseSyntax node, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.SymbolInfo GetSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.SelectOrGroupClauseSyntax node, System.Threading.CancellationToken cancellationToken = default);
static member GetSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.SelectOrGroupClauseSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetSymbolInfo (semanticModel As SemanticModel, node As SelectOrGroupClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

Parameters

semanticModel
SemanticModel
cancellationToken
CancellationToken

Returns

Applies to