IDistributedCache.GetAsync IDistributedCache.GetAsync IDistributedCache.GetAsync IDistributedCache.GetAsync Method

Definition

Overloads

GetAsync(String) GetAsync(String) GetAsync(String) GetAsync(String)
GetAsync(String, CancellationToken) GetAsync(String, CancellationToken) GetAsync(String, CancellationToken)

Gets a value with the given key.

GetAsync(String) GetAsync(String) GetAsync(String) GetAsync(String)

public:
 System::Threading::Tasks::Task<cli::array <System::Byte> ^> ^ GetAsync(System::String ^ key);
public System.Threading.Tasks.Task<byte[]> GetAsync (string key);
abstract member GetAsync : string -> System.Threading.Tasks.Task<byte[]>
Public Function GetAsync (key As String) As Task(Of Byte())

Parameters

Returns

Task<Byte[]>

GetAsync(String, CancellationToken) GetAsync(String, CancellationToken) GetAsync(String, CancellationToken)

Gets a value with the given key.

public System.Threading.Tasks.Task<byte[]> GetAsync (string key, System.Threading.CancellationToken token = null);
abstract member GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<byte[]>
Public Function GetAsync (key As String, Optional token As CancellationToken = null) As Task(Of Byte())

Parameters

key
String String String String

A string identifying the requested value.

token
CancellationToken CancellationToken CancellationToken CancellationToken

Optional. The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

Task<Byte[]>

The Task that represents the asynchronous operation, containing the located value or null.

Applies to