ProtectedBrowserStorage.SetAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetAsync(String, Object) |
Asynchronously stores the specified data.
Since no data protection purpose is specified with this overload, the purpose is derived from
|
SetAsync(String, String, Object) |
Asynchronously stores the supplied data. |
SetAsync(String, Object)
- Source:
- ProtectedBrowserStorage.cs
Asynchronously stores 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:
System::Threading::Tasks::ValueTask SetAsync(System::String ^ key, System::Object ^ value);
public System.Threading.Tasks.ValueTask SetAsync (string key, object value);
member this.SetAsync : string * obj -> System.Threading.Tasks.ValueTask
Public Function SetAsync (key As String, value As Object) As ValueTask
Parameters
- value
- Object
A JSON-serializable value to be stored.
Returns
A ValueTask representing the completion of the operation.
Applies to
SetAsync(String, String, Object)
- Source:
- ProtectedBrowserStorage.cs
Asynchronously stores the supplied data.
public:
System::Threading::Tasks::ValueTask SetAsync(System::String ^ purpose, System::String ^ key, System::Object ^ value);
public System.Threading.Tasks.ValueTask SetAsync (string purpose, string key, object value);
member this.SetAsync : string * string * obj -> System.Threading.Tasks.ValueTask
Public Function SetAsync (purpose As String, key As String, value As Object) As ValueTask
Parameters
- purpose
- String
A string that defines a scope for the data protection. The protected data can only be unprotected by code that specifies the same purpose.
- value
- Object
A JSON-serializable value to be stored.
Returns
A ValueTask representing the completion of the operation.