ISolutionCacheService.AddContainerAsync 方法

定义

将缓存项容器添加到具有指定键的缓存中。

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::RpcContracts::Caching::CacheItemKey> ^ AddContainerAsync(Microsoft::VisualStudio::RpcContracts::Caching::CacheContainer ^ container, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Caching.CacheItemKey> AddContainerAsync (Microsoft.VisualStudio.RpcContracts.Caching.CacheContainer container, System.Threading.CancellationToken cancellationToken);
abstract member AddContainerAsync : Microsoft.VisualStudio.RpcContracts.Caching.CacheContainer * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.RpcContracts.Caching.CacheItemKey>
Public Function AddContainerAsync (container As CacheContainer, cancellationToken As CancellationToken) As Task(Of CacheItemKey)

参数

container
CacheContainer

容器实例。

cancellationToken
CancellationToken

要监视的取消标记。

返回

Task<CacheItemKey>

表示容器项的 CacheKey。

例外

当调用方没有写入权限时引发。

当容器密钥在具有不同内容的系统中已存在时引发。

适用于