AnalysisContext.RegisterSyntaxNodeAction 方法

定义

重载

RegisterSyntaxNodeAction<TLanguageKindEnum>(Action<SyntaxNodeAnalysisContext>, ImmutableArray<TLanguageKindEnum>)

注册一个操作,以完成对适当类型进行 SyntaxNode 语义分析时要执行的操作。 语法节点操作可以报告 Diagnostic有关 SyntaxNodes 的信息,还可以收集其他语法节点操作或代码块结束操作要使用的状态信息。

RegisterSyntaxNodeAction<TLanguageKindEnum>(Action<SyntaxNodeAnalysisContext>, TLanguageKindEnum[])

注册一个操作,以完成对适当类型进行 SyntaxNode 语义分析时要执行的操作。 语法节点操作可以报告 Diagnostic有关 SyntaxNodes 的信息,还可以收集其他语法节点操作或代码块结束操作要使用的状态信息。

RegisterSyntaxNodeAction<TLanguageKindEnum>(Action<SyntaxNodeAnalysisContext>, ImmutableArray<TLanguageKindEnum>)

Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs

注册一个操作,以完成对适当类型进行 SyntaxNode 语义分析时要执行的操作。 语法节点操作可以报告 Diagnostic有关 SyntaxNodes 的信息,还可以收集其他语法节点操作或代码块结束操作要使用的状态信息。

public:
generic <typename TLanguageKindEnum>
 where TLanguageKindEnum : value class abstract void RegisterSyntaxNodeAction(Action<Microsoft::CodeAnalysis::Diagnostics::SyntaxNodeAnalysisContext> ^ action, System::Collections::Immutable::ImmutableArray<TLanguageKindEnum> syntaxKinds);
public abstract void RegisterSyntaxNodeAction<TLanguageKindEnum> (Action<Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext> action, System.Collections.Immutable.ImmutableArray<TLanguageKindEnum> syntaxKinds) where TLanguageKindEnum : struct;
abstract member RegisterSyntaxNodeAction : Action<Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext> * System.Collections.Immutable.ImmutableArray<'LanguageKindEnum (requires 'LanguageKindEnum : struct)> -> unit (requires 'LanguageKindEnum : struct)
Public MustOverride Sub RegisterSyntaxNodeAction(Of TLanguageKindEnum As Structure) (action As Action(Of SyntaxNodeAnalysisContext), syntaxKinds As ImmutableArray(Of TLanguageKindEnum))

类型参数

TLanguageKindEnum

枚举类型提供应用操作的源语言的语法节点类型。

参数

action
Action<SyntaxNodeAnalysisContext>

在完成对 a SyntaxNode的语义分析时要执行的操作。

syntaxKinds
ImmutableArray<TLanguageKindEnum>

仅当's Kind 与语法类型值之一匹配时 SyntaxNode,才会执行操作。

适用于

RegisterSyntaxNodeAction<TLanguageKindEnum>(Action<SyntaxNodeAnalysisContext>, TLanguageKindEnum[])

Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs
Source:
DiagnosticAnalysisContext.cs

注册一个操作,以完成对适当类型进行 SyntaxNode 语义分析时要执行的操作。 语法节点操作可以报告 Diagnostic有关 SyntaxNodes 的信息,还可以收集其他语法节点操作或代码块结束操作要使用的状态信息。

public:
generic <typename TLanguageKindEnum>
 where TLanguageKindEnum : value class void RegisterSyntaxNodeAction(Action<Microsoft::CodeAnalysis::Diagnostics::SyntaxNodeAnalysisContext> ^ action, ... cli::array <TLanguageKindEnum> ^ syntaxKinds);
public void RegisterSyntaxNodeAction<TLanguageKindEnum> (Action<Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext> action, params TLanguageKindEnum[] syntaxKinds) where TLanguageKindEnum : struct;
member this.RegisterSyntaxNodeAction : Action<Microsoft.CodeAnalysis.Diagnostics.SyntaxNodeAnalysisContext> * 'LanguageKindEnum[] -> unit (requires 'LanguageKindEnum : struct)
Public Sub RegisterSyntaxNodeAction(Of TLanguageKindEnum As Structure) (action As Action(Of SyntaxNodeAnalysisContext), ParamArray syntaxKinds As TLanguageKindEnum())

类型参数

TLanguageKindEnum

枚举类型提供应用操作的源语言的语法节点类型。

参数

action
Action<SyntaxNodeAnalysisContext>

在完成对 a SyntaxNode的语义分析时要执行的操作。

syntaxKinds
TLanguageKindEnum[]

仅当's Kind 与语法类型值之一匹配时 SyntaxNode,才会执行操作。

适用于