Partager via


CSharpExtensions.GetDeclaredSymbol Méthode

Définition

Surcharges

GetDeclaredSymbol(SemanticModel, LabeledStatementSyntax, CancellationToken)

En fonction de la syntaxe d’une instruction étiquetée, obtenez le symbole d’étiquette correspondant.

GetDeclaredSymbol(SemanticModel, LocalFunctionStatementSyntax, CancellationToken)

Avec une syntaxe de déclaration de fonction locale, obtenez le symbole correspondant.

GetDeclaredSymbol(SemanticModel, MemberDeclarationSyntax, CancellationToken)

En fonction de la syntaxe d’une déclaration de membre, obtenez le symbole correspondant.

GetDeclaredSymbol(SemanticModel, NamespaceDeclarationSyntax, CancellationToken)

Étant donné un nœud de syntaxe de déclaration d’espace de noms, obtenez le symbole d’espace de noms correspondant pour l’assembly de déclaration.

GetDeclaredSymbol(SemanticModel, ParameterSyntax, CancellationToken)

Pour un nœud de syntaxe de déclaration de paramètre, obtenez le symbole correspondant.

GetDeclaredSymbol(SemanticModel, PropertyDeclarationSyntax, CancellationToken)

Étant donné un nœud de syntaxe qui déclare une propriété, obtenez le symbole déclaré correspondant.

GetDeclaredSymbol(SemanticModel, QueryClauseSyntax, CancellationToken)
GetDeclaredSymbol(SemanticModel, QueryContinuationSyntax, CancellationToken)

Obtenez la variable de plage de requête déclarée dans une clause de continuation de requête.

GetDeclaredSymbol(SemanticModel, SwitchLabelSyntax, CancellationToken)

Avec une syntaxe d’étiquette de commutateur, obtenez le symbole d’étiquette correspondant.

GetDeclaredSymbol(SemanticModel, TupleElementSyntax, CancellationToken)

Avec la syntaxe d’un élément tuple, obtenez le symbole correspondant.

GetDeclaredSymbol(SemanticModel, TupleExpressionSyntax, CancellationToken)

Étant donné un nœud de syntaxe d’expression de tuple, obtenez le symbole de type tuple.

GetDeclaredSymbol(SemanticModel, TypeParameterSyntax, CancellationToken)

Étant donné une déclaration de paramètre de type (champ ou méthode), obtenez le symbole correspondant

GetDeclaredSymbol(SemanticModel, UsingDirectiveSyntax, CancellationToken)

Dans une déclaration using, obtenez le symbole correspondant pour l’alias using qui a été introduit.

GetDeclaredSymbol(SemanticModel, VariableDeclaratorSyntax, CancellationToken)

En fonction de la syntaxe d’un déclarateur de variable, obtenez le symbole correspondant.

GetDeclaredSymbol(SemanticModel, SingleVariableDesignationSyntax, CancellationToken)

En fonction de la syntaxe d’un déclarateur de variable, obtenez le symbole correspondant.

GetDeclaredSymbol(SemanticModel, JoinIntoClauseSyntax, CancellationToken)

Obtient la variable de plage de requête déclarée dans une jointure dans la clause .

GetDeclaredSymbol(SemanticModel, CompilationUnitSyntax, CancellationToken)

Avec une syntaxe d’unité de compilation, obtenez le symbole de point d’entrée Programme simple correspondant.

GetDeclaredSymbol(SemanticModel, ForEachStatementSyntax, CancellationToken)

Dans une instruction foreach, obtenez le symbole de la variable d’itération

GetDeclaredSymbol(SemanticModel, AccessorDeclarationSyntax, CancellationToken)

Étant donné un nœud de syntaxe qui déclare une propriété ou un accesseur membre, obtenez le symbole correspondant.

GetDeclaredSymbol(SemanticModel, AnonymousObjectCreationExpressionSyntax, CancellationToken)

Étant donné un nœud de syntaxe d’expression de création d’objet anonyme, obtenez le symbole de type d’objet anonyme.

GetDeclaredSymbol(SemanticModel, AnonymousObjectMemberDeclaratorSyntax, CancellationToken)

Étant donné un nœud de syntaxe de l’initialiseur de création d’objet anonyme, obtenez le symbole de propriété de l’objet anonyme.

GetDeclaredSymbol(SemanticModel, ArgumentSyntax, CancellationToken)

Étant donné un nœud de syntaxe d’un argument tuple, obtenez le symbole d’élément tuple.

GetDeclaredSymbol(SemanticModel, BaseMethodDeclarationSyntax, CancellationToken)

En fonction de la syntaxe de déclaration de méthode de base, obtenez le symbole de méthode correspondant.

GetDeclaredSymbol(SemanticModel, BasePropertyDeclarationSyntax, CancellationToken)

Étant donné un nœud de syntaxe qui déclare une propriété, un indexeur ou un événement, obtenez le symbole déclaré correspondant.

GetDeclaredSymbol(SemanticModel, IndexerDeclarationSyntax, CancellationToken)

Étant donné un nœud de syntaxe qui déclare un indexeur, obtenez le symbole déclaré correspondant.

GetDeclaredSymbol(SemanticModel, BaseTypeDeclarationSyntax, CancellationToken)

Dans une déclaration de type, obtenez le symbole de type correspondant.

GetDeclaredSymbol(SemanticModel, DelegateDeclarationSyntax, CancellationToken)

Dans une déclaration de délégué, obtenez le symbole de type correspondant.

GetDeclaredSymbol(SemanticModel, EnumMemberDeclarationSyntax, CancellationToken)

Dans une déclaration de membre enum, obtenez le symbole de champ correspondant.

GetDeclaredSymbol(SemanticModel, EventDeclarationSyntax, CancellationToken)

Étant donné un nœud de syntaxe qui déclare un événement (personnalisé), obtenez le symbole d’événement correspondant.

GetDeclaredSymbol(SemanticModel, ExternAliasDirectiveSyntax, CancellationToken)

Avec une déclaration d’alias extern, obtenez le symbole correspondant pour l’alias qui a été introduit.

GetDeclaredSymbol(SemanticModel, FileScopedNamespaceDeclarationSyntax, CancellationToken)

Étant donné un nœud de syntaxe de déclaration d’espace de noms, obtenez le symbole d’espace de noms correspondant pour l’assembly de déclaration.

GetDeclaredSymbol(SemanticModel, CatchDeclarationSyntax, CancellationToken)

Dans une déclaration catch, obtenez le symbole de la variable d’exception

GetDeclaredSymbol(SemanticModel, LabeledStatementSyntax, 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

En fonction de la syntaxe d’une instruction étiquetée, obtenez le symbole d’étiquette correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
LabeledStatementSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, LocalFunctionStatementSyntax, CancellationToken)

Source:
CSharpExtensions.cs

Avec une syntaxe de déclaration de fonction locale, obtenez le symbole correspondant.

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

Paramètres

semanticModel
SemanticModel
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, MemberDeclarationSyntax, 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

En fonction de la syntaxe d’une déclaration de membre, obtenez le symbole correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
MemberDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, NamespaceDeclarationSyntax, 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

Étant donné un nœud de syntaxe de déclaration d’espace de noms, obtenez le symbole d’espace de noms correspondant pour l’assembly de déclaration.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
NamespaceDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, ParameterSyntax, 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

Pour un nœud de syntaxe de déclaration de paramètre, obtenez le symbole correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
ParameterSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, PropertyDeclarationSyntax, 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

Étant donné un nœud de syntaxe qui déclare une propriété, obtenez le symbole déclaré correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
PropertyDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, QueryClauseSyntax, 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
public static Microsoft.CodeAnalysis.IRangeVariableSymbol GetDeclaredSymbol (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.QueryClauseSyntax queryClause, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.IRangeVariableSymbol? GetDeclaredSymbol (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.QueryClauseSyntax queryClause, System.Threading.CancellationToken cancellationToken = default);
static member GetDeclaredSymbol : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.QueryClauseSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.IRangeVariableSymbol
<Extension()>
Public Function GetDeclaredSymbol (semanticModel As SemanticModel, queryClause As QueryClauseSyntax, Optional cancellationToken As CancellationToken = Nothing) As IRangeVariableSymbol

Paramètres

semanticModel
SemanticModel
queryClause
QueryClauseSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, QueryContinuationSyntax, 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

Obtenez la variable de plage de requête déclarée dans une clause de continuation de requête.

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

Paramètres

semanticModel
SemanticModel
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, SwitchLabelSyntax, 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

Avec une syntaxe d’étiquette de commutateur, obtenez le symbole d’étiquette correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
SwitchLabelSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, TupleElementSyntax, 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

Avec la syntaxe d’un élément tuple, obtenez le symbole correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
TupleElementSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, TupleExpressionSyntax, 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

Étant donné un nœud de syntaxe d’expression de tuple, obtenez le symbole de type tuple.

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

Paramètres

semanticModel
SemanticModel
declaratorSyntax
TupleExpressionSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, TypeParameterSyntax, 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

Étant donné une déclaration de paramètre de type (champ ou méthode), obtenez le symbole correspondant

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

Paramètres

semanticModel
SemanticModel
typeParameter
TypeParameterSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, UsingDirectiveSyntax, 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

Dans une déclaration using, obtenez le symbole correspondant pour l’alias using qui a été introduit.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
UsingDirectiveSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, VariableDeclaratorSyntax, 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

En fonction de la syntaxe d’un déclarateur de variable, obtenez le symbole correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
VariableDeclaratorSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, SingleVariableDesignationSyntax, 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

En fonction de la syntaxe d’un déclarateur de variable, obtenez le symbole correspondant.

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

Paramètres

semanticModel
SemanticModel
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, JoinIntoClauseSyntax, 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

Obtient la variable de plage de requête déclarée dans une jointure dans la clause .

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

Paramètres

semanticModel
SemanticModel
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, CompilationUnitSyntax, 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

Avec une syntaxe d’unité de compilation, obtenez le symbole de point d’entrée Programme simple correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
CompilationUnitSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, ForEachStatementSyntax, 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

Dans une instruction foreach, obtenez le symbole de la variable d’itération

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

Paramètres

semanticModel
SemanticModel
forEachStatement
ForEachStatementSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, AccessorDeclarationSyntax, 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

Étant donné un nœud de syntaxe qui déclare une propriété ou un accesseur membre, obtenez le symbole correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
AccessorDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, AnonymousObjectCreationExpressionSyntax, 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

Étant donné un nœud de syntaxe d’expression de création d’objet anonyme, obtenez le symbole de type d’objet anonyme.

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

Paramètres

semanticModel
SemanticModel
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, AnonymousObjectMemberDeclaratorSyntax, 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

Étant donné un nœud de syntaxe de l’initialiseur de création d’objet anonyme, obtenez le symbole de propriété de l’objet anonyme.

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

Paramètres

semanticModel
SemanticModel
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, ArgumentSyntax, 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

Étant donné un nœud de syntaxe d’un argument tuple, obtenez le symbole d’élément tuple.

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

Paramètres

semanticModel
SemanticModel
declaratorSyntax
ArgumentSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, BaseMethodDeclarationSyntax, 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

En fonction de la syntaxe de déclaration de méthode de base, obtenez le symbole de méthode correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
BaseMethodDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, BasePropertyDeclarationSyntax, 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

Étant donné un nœud de syntaxe qui déclare une propriété, un indexeur ou un événement, obtenez le symbole déclaré correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
BasePropertyDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, IndexerDeclarationSyntax, 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

Étant donné un nœud de syntaxe qui déclare un indexeur, obtenez le symbole déclaré correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
IndexerDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, BaseTypeDeclarationSyntax, 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

Dans une déclaration de type, obtenez le symbole de type correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
BaseTypeDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, DelegateDeclarationSyntax, 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

Dans une déclaration de délégué, obtenez le symbole de type correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
DelegateDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, EnumMemberDeclarationSyntax, 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

Dans une déclaration de membre enum, obtenez le symbole de champ correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
EnumMemberDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, EventDeclarationSyntax, 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

Étant donné un nœud de syntaxe qui déclare un événement (personnalisé), obtenez le symbole d’événement correspondant.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
EventDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, ExternAliasDirectiveSyntax, 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

Avec une déclaration d’alias extern, obtenez le symbole correspondant pour l’alias qui a été introduit.

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

Paramètres

semanticModel
SemanticModel
declarationSyntax
ExternAliasDirectiveSyntax
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, FileScopedNamespaceDeclarationSyntax, 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

Étant donné un nœud de syntaxe de déclaration d’espace de noms, obtenez le symbole d’espace de noms correspondant pour l’assembly de déclaration.

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

Paramètres

semanticModel
SemanticModel
cancellationToken
CancellationToken

Retours

S’applique à

GetDeclaredSymbol(SemanticModel, CatchDeclarationSyntax, 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

Dans une déclaration catch, obtenez le symbole de la variable d’exception

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

Paramètres

semanticModel
SemanticModel
catchDeclaration
CatchDeclarationSyntax
cancellationToken
CancellationToken

Retours

S’applique à