SemanticModel.LookupLabels(Int32, String) メソッド

定義

指定した場所とオプションのコンテナーのコンテキストで使用できる名前付きラベル 記号を取得します。 特定の場所からアクセス可能で表示されているメンバーのみが返されます。

public System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISymbol> LookupLabels (int position, string name = default);
public System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISymbol> LookupLabels (int position, string? name = default);
member this.LookupLabels : int * string -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISymbol>
Public Function LookupLabels (position As Integer, Optional name As String = Nothing) As ImmutableArray(Of ISymbol)

パラメーター

position
Int32

外側の宣言スコープとアクセシビリティを決定するための文字位置。

name
String

検索するシンボルの名前。 null を指定すると、任意の名前のシンボルが返されます。

戻り値

見つかったシンボルの一覧。 シンボルが見つからなかった場合は、空のリストが返されます。

注釈

"position" は、どの変数が表示され、アクセス可能であるかを決定するために使用されます。 "container" を指定した場合でも、"containing" のどのメンバーがアクセス可能であるかを判断するために、"position" の場所が重要です。

適用対象