CodeContainerStorageManager.AddOrUpdateAsync(CodeContainer, CancellationToken) 方法

定義

新增或更新所提供之 Shell 的記錄 codeContainerAdds or updates the records of the Shell for the supplied codeContainer. 也可漫遊相關聯的( Remote 如果有的話)。Also roams the associated Remote if any.

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

要新增或更新的容器The container to be added or updated

cancellationToken
CancellationToken

取消權杖Cancellation token

傳回

Task<Int32>

指派給此變更的修訂編號The revision number assigned to this change

實作

例外狀況

如果 codeContainer 是 null,則擲回。Thrown if codeContainer is null.

適用於