CodeContainerStorageManager.AddOrUpdateAsync 方法

定义

为提供的添加或更新 Shell 记录 codeContainer 。 还将漫游关联的( Remote 如果有)。

public System.Threading.Tasks.Task<int> AddOrUpdateAsync (Microsoft.VisualStudio.Shell.CodeContainerManagement.CodeContainer codeContainer, System.Threading.CancellationToken cancellationToken = default);
abstract member AddOrUpdateAsync : Microsoft.VisualStudio.Shell.CodeContainerManagement.CodeContainer * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
override this.AddOrUpdateAsync : Microsoft.VisualStudio.Shell.CodeContainerManagement.CodeContainer * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Function AddOrUpdateAsync (codeContainer As CodeContainer, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)

参数

codeContainer
CodeContainer

要添加或更新的容器

cancellationToken
CancellationToken

取消令牌

返回

Task<Int32>

分配给此更改的修订号

实现

例外

如果为 null,则引发 codeContainer

适用于