TextLoader.LoadTextAndVersionAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
LoadTextAndVersionAsync(LoadTextOptions, CancellationToken) |
載入文字和檔的版本。 |
LoadTextAndVersionAsync(Workspace, DocumentId, CancellationToken) |
已淘汰.
載入文字和檔的版本。 |
LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)
- Source:
- TextLoader.cs
- Source:
- TextLoader.cs
- Source:
- TextLoader.cs
- Source:
- TextLoader.cs
- Source:
- TextLoader.cs
載入文字和檔的版本。
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)
參數
- options
- LoadTextOptions
從原始二進位標記法建立 SourceText 時,這個方法的實作應該使用 ChecksumAlgorithm ,否則會忽略它。
這個方法的呼叫端應該傳遞 LoadTextOptions 指定 所需的屬性 SourceText 。 實作可能會傳回 SourceText 不符合指定需求的 。 例如,未覆寫這個方法的舊版類型會忽略所有 options
。
- cancellationToken
- CancellationToken
取消權杖。
傳回
例外狀況
適用於
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
警告
Use/override LoadTextAndVersionAsync(LoadTextOptions, CancellationToken)
載入文字和檔的版本。
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)
參數
- workspace
- Workspace
已過時。 Null。
- documentId
- DocumentId
已過時。 Null。
- cancellationToken
- CancellationToken
傳回
- 屬性