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
- 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
- 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
返回
- 属性