Udostępnij za pośrednictwem


ISolutionCacheService.AddContainerAsync Method

Definition

Adds a cache item container to the cache with the specified key.

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)

Parameters

container
CacheContainer

Container instance.

cancellationToken
CancellationToken

Cancellation token to monitor.

Returns

CacheKey that represents the container item.

Exceptions

Thrown when caller has no write permissions.

Thrown when container key already exists in the system with different contents.

Applies to