ProtectedBrowserStorage.GetAsync Method

Definition

Overloads

GetAsync<TValue>(String)

Asynchronously retrieves the specified data.

Since no data protection purpose is specified with this overload, the purpose is derived from key and the store name. This is a good default purpose to use if the keys come from a fixed set known at compile-time.

GetAsync<TValue>(String, String)

Asynchronously retrieves the specified data.

GetAsync<TValue>(String)

Asynchronously retrieves the specified data.

Since no data protection purpose is specified with this overload, the purpose is derived from key and the store name. This is a good default purpose to use if the keys come from a fixed set known at compile-time.

public:
generic <typename TValue>
 System::Threading::Tasks::ValueTask<Microsoft::AspNetCore::Components::Server::ProtectedBrowserStorage::ProtectedBrowserStorageResult<TValue>> GetAsync(System::String ^ key);
public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorageResult<TValue>> GetAsync<TValue> (string key);
member this.GetAsync : string -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorageResult<'Value>>
Public Function GetAsync(Of TValue) (key As String) As ValueTask(Of ProtectedBrowserStorageResult(Of TValue))

Type Parameters

TValue

Parameters

key
String

A String value specifying the name of the storage slot to use.

Returns

A ValueTask representing the completion of the operation.

Applies to

GetAsync<TValue>(String, String)

Asynchronously retrieves the specified data.

public:
generic <typename TValue>
 System::Threading::Tasks::ValueTask<Microsoft::AspNetCore::Components::Server::ProtectedBrowserStorage::ProtectedBrowserStorageResult<TValue>> GetAsync(System::String ^ purpose, System::String ^ key);
public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorageResult<TValue>> GetAsync<TValue> (string purpose, string key);
member this.GetAsync : string * string -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage.ProtectedBrowserStorageResult<'Value>>
Public Function GetAsync(Of TValue) (purpose As String, key As String) As ValueTask(Of ProtectedBrowserStorageResult(Of TValue))

Type Parameters

TValue

Parameters

purpose
String

A string that defines a scope for the data protection. The protected data can only be unprotected if the same purpose was previously specified when calling SetAsync(String, String, Object).

key
String

A String value specifying the name of the storage slot to use.

Returns

A ValueTask representing the completion of the operation.

Applies to