IWorkspace.GetFileContextsAsync Método

Definição

Sobrecargas

GetFileContextsAsync(String, IEnumerable<Guid>, CancellationToken)

Obtém os contextos de arquivo associados ao local do espaço de trabalho especificado.

GetFileContextsAsync<T>(String, T, IEnumerable<Guid>, CancellationToken)

Obter contextos de arquivo para um contexto de espaço de trabalho

GetFileContextsAsync(String, IEnumerable<Guid>, CancellationToken)

Obtém os contextos de arquivo associados ao local do espaço de trabalho especificado.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Linq.IGrouping<Lazy<Microsoft.VisualStudio.Workspace.IFileContextProvider,Microsoft.VisualStudio.Workspace.IFileContextProviderMetadata>,Microsoft.VisualStudio.Workspace.FileContext>>> GetFileContextsAsync (string path, System.Collections.Generic.IEnumerable<Guid> fileContextTypes, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFileContextsAsync : string * seq<Guid> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Linq.IGrouping<Lazy<Microsoft.VisualStudio.Workspace.IFileContextProvider, Microsoft.VisualStudio.Workspace.IFileContextProviderMetadata>, Microsoft.VisualStudio.Workspace.FileContext>>>
Public Function GetFileContextsAsync (path As String, fileContextTypes As IEnumerable(Of Guid), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of IGrouping(Of Lazy(Of IFileContextProvider, IFileContextProviderMetadata), FileContext)))

Parâmetros

path
String

O caminho para o arquivo ou pasta para o qual um contexto é necessário. Pode ser absoluto ou relativo à raiz do espaço de trabalho Location .

fileContextTypes
IEnumerable<Guid>

A coleção de tipos de contexto de arquivo de interesse do chamador.

cancellationToken
CancellationToken

Um token de cancelamento.

Retornos

Task<IReadOnlyList<IGrouping<Lazy<IFileContextProvider,IFileContextProviderMetadata>,FileContext>>>

A coleção de provedores de contexto de arquivo aplicáveis.

Aplica-se a

GetFileContextsAsync<T>(String, T, IEnumerable<Guid>, CancellationToken)

Obter contextos de arquivo para um contexto de espaço de trabalho

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Linq.IGrouping<Lazy<Microsoft.VisualStudio.Workspace.IFileContextProvider,Microsoft.VisualStudio.Workspace.IFileContextProviderMetadata>,Microsoft.VisualStudio.Workspace.FileContext>>> GetFileContextsAsync<T> (string path, T context, System.Collections.Generic.IEnumerable<Guid> fileContextTypes, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFileContextsAsync : string * 'T * seq<Guid> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.Linq.IGrouping<Lazy<Microsoft.VisualStudio.Workspace.IFileContextProvider, Microsoft.VisualStudio.Workspace.IFileContextProviderMetadata>, Microsoft.VisualStudio.Workspace.FileContext>>>
Public Function GetFileContextsAsync(Of T) (path As String, context As T, fileContextTypes As IEnumerable(Of Guid), Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of IGrouping(Of Lazy(Of IFileContextProvider, IFileContextProviderMetadata), FileContext)))

Parâmetros de tipo

T

Tipo do contexto do espaço de trabalho que está sendo passado

Parâmetros

path
String

O caminho para o arquivo ou pasta para o qual um contexto é necessário. Pode ser absoluto ou relativo à raiz do espaço de trabalho Location .

context
T

Instância do contexto do espaço de trabalho

fileContextTypes
IEnumerable<Guid>

A coleção de tipos de contexto de arquivo de interesse para o chamador.

cancellationToken
CancellationToken

Um token de cancelamento.

Retornos

Task<IReadOnlyList<IGrouping<Lazy<IFileContextProvider,IFileContextProviderMetadata>,FileContext>>>

A coleção de provedores de contexto de arquivo aplicáveis.

Aplica-se a