Share via


SemanticModel.GetImportScopes(Int32, CancellationToken) 方法

定義

在此 SemanticModel 的 SyntaxTree 中指定位置時, IImportScope 會傳回該點的 。 範圍是從最接近傳入 position 到最遠的範圍排序。 如需每個範圍可用資訊的更深入描述,請參閱 IImportScope

public System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.IImportScope> GetImportScopes (int position, System.Threading.CancellationToken cancellationToken = default);
member this.GetImportScopes : int * System.Threading.CancellationToken -> System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.IImportScope>
Public Function GetImportScopes (position As Integer, Optional cancellationToken As CancellationToken = Nothing) As ImmutableArray(Of IImportScope)

參數

position
Int32
cancellationToken
CancellationToken

傳回

適用於