Megosztás a következőn keresztül:


TextLoader.LoadTextAndVersionAsync Method

Definition

Overloads

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

Load a text and a version of the document.

LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken)
Obsolete.

Load a text and a version of the document.

LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

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

Load a text and a version of the document.

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)

Parameters

options
LoadTextOptions

Implementations of this method should use ChecksumAlgorithm when creating SourceText from an original binary representation and ignore it otherwise. Callers of this method should pass LoadTextOptions specifying the desired properties of SourceText. The implementation may return a SourceText that does not satisfy the given requirements. For example, legacy types that do not override this method would ignore all options.

cancellationToken
CancellationToken

Cancellation token.

Returns

Exceptions

Applies to

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

Caution

Use/override LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)

Load a text and a version of the document.

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)

Parameters

workspace
Workspace

Obsolete. Null.

documentId
DocumentId

Obsolete. Null.

cancellationToken
CancellationToken

Returns

Attributes

Exceptions

Applies to