Compartir a través de


TextLoader.LoadTextAndVersionAsync Método

Definición

Sobrecargas

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

Cargue un texto y una versión del documento.

LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken)
Obsoletos.

Cargue un texto y una versión del documento.

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs

Cargue un texto y una versión del documento.

public virtual System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion> LoadTextAndVersionAsync (Microsoft.CodeAnalysis.LoadTextOptions options, System.Threading.CancellationToken cancellationToken);
abstract member LoadTextAndVersionAsync : Microsoft.CodeAnalysis.LoadTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion>
override this.LoadTextAndVersionAsync : Microsoft.CodeAnalysis.LoadTextOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion>
Public Overridable Function LoadTextAndVersionAsync (options As LoadTextOptions, cancellationToken As CancellationToken) As Task(Of TextAndVersion)

Parámetros

options
LoadTextOptions

Las implementaciones de este método deben usarse ChecksumAlgorithm al crear SourceText a partir de una representación binaria original y omitirla en caso contrario. Los autores de llamadas de este método deben pasar LoadTextOptions especificando las propiedades deseadas de SourceText. La implementación puede devolver un SourceText que no cumple los requisitos especificados. Por ejemplo, los tipos heredados que no invalidan este método omitirían todos .options

cancellationToken
CancellationToken

Token de cancelación.

Devoluciones

Excepciones

Se aplica a

LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken)

Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs
Source:
TextLoader.cs

Precaución

Use/override LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

Cargue un texto y una versión del documento.

public:
 abstract System::Threading::Tasks::Task<Microsoft::CodeAnalysis::TextAndVersion ^> ^ LoadTextAndVersionAsync(Microsoft::CodeAnalysis::Workspace ^ workspace, Microsoft::CodeAnalysis::DocumentId ^ documentId, System::Threading::CancellationToken cancellationToken);
public abstract System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion> LoadTextAndVersionAsync (Microsoft.CodeAnalysis.Workspace workspace, Microsoft.CodeAnalysis.DocumentId documentId, System.Threading.CancellationToken cancellationToken);
[System.Obsolete("Use/override LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)")]
public virtual System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion> LoadTextAndVersionAsync (Microsoft.CodeAnalysis.Workspace? workspace, Microsoft.CodeAnalysis.DocumentId? documentId, System.Threading.CancellationToken cancellationToken);
abstract member LoadTextAndVersionAsync : Microsoft.CodeAnalysis.Workspace * Microsoft.CodeAnalysis.DocumentId * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion>
[<System.Obsolete("Use/override LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)")>]
abstract member LoadTextAndVersionAsync : Microsoft.CodeAnalysis.Workspace * Microsoft.CodeAnalysis.DocumentId * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion>
override this.LoadTextAndVersionAsync : Microsoft.CodeAnalysis.Workspace * Microsoft.CodeAnalysis.DocumentId * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.TextAndVersion>
Public MustOverride Function LoadTextAndVersionAsync (workspace As Workspace, documentId As DocumentId, cancellationToken As CancellationToken) As Task(Of TextAndVersion)
Public Overridable Function LoadTextAndVersionAsync (workspace As Workspace, documentId As DocumentId, cancellationToken As CancellationToken) As Task(Of TextAndVersion)

Parámetros

workspace
Workspace

Obsoleto. NULL.

documentId
DocumentId

Obsoleto. NULL.

cancellationToken
CancellationToken

Devoluciones

Atributos

Excepciones

Se aplica a