CompilationStartAnalysisContext.RegisterSymbolStartAction 方法

定义

注册一个操作,以在语义分析开始时使用适当的 Kind 进行其成员的语义分析 ISymbol

public virtual void RegisterSymbolStartAction (Action<Microsoft.CodeAnalysis.Diagnostics.SymbolStartAnalysisContext> action, Microsoft.CodeAnalysis.SymbolKind symbolKind);
abstract member RegisterSymbolStartAction : Action<Microsoft.CodeAnalysis.Diagnostics.SymbolStartAnalysisContext> * Microsoft.CodeAnalysis.SymbolKind -> unit
override this.RegisterSymbolStartAction : Action<Microsoft.CodeAnalysis.Diagnostics.SymbolStartAnalysisContext> * Microsoft.CodeAnalysis.SymbolKind -> unit
Public Overridable Sub RegisterSymbolStartAction (action As Action(Of SymbolStartAnalysisContext), symbolKind As SymbolKind)

参数

action
Action<SymbolStartAnalysisContext>

要执行的操作。

symbolKind
SymbolKind

仅当'Kind 与给定SymbolKind的 Kind 匹配时ISymbol,才会执行操作。

适用于