Share via


JSObjectReference.SetValueAsync Method

Definition

Overloads

SetValueAsync<TValue>(String, TValue)

Updates the value of the specified JavaScript property asynchronously. If the property is not defined on the target object, it will be created.

SetValueAsync<TValue>(String, TValue, CancellationToken)

Updates the value of the specified JavaScript property asynchronously. If the property is not defined on the target object, it will be created.

SetValueAsync<TValue>(String, TValue)

Source:
JSObjectReference.cs

Updates the value of the specified JavaScript property asynchronously. If the property is not defined on the target object, it will be created.

public System.Threading.Tasks.ValueTask SetValueAsync<TValue>(string identifier, TValue value);
abstract member SetValueAsync : string * 'Value -> System.Threading.Tasks.ValueTask
override this.SetValueAsync : string * 'Value -> System.Threading.Tasks.ValueTask
Public Function SetValueAsync(Of TValue) (identifier As String, value As TValue) As ValueTask

Type Parameters

TValue

JSON-serializable argument type.

Parameters

identifier
String

An identifier for the property to set. For example, the value "someScope.someProp" will update the property someScope.someProp on the target instance.

value
TValue

JSON-serializable value.

Returns

A ValueTask that represents the asynchronous invocation operation.

Implements

Applies to

SetValueAsync<TValue>(String, TValue, CancellationToken)

Source:
JSObjectReference.cs

Updates the value of the specified JavaScript property asynchronously. If the property is not defined on the target object, it will be created.

public System.Threading.Tasks.ValueTask SetValueAsync<TValue>(string identifier, TValue value, System.Threading.CancellationToken cancellationToken);
abstract member SetValueAsync : string * 'Value * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
override this.SetValueAsync : string * 'Value * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function SetValueAsync(Of TValue) (identifier As String, value As TValue, cancellationToken As CancellationToken) As ValueTask

Type Parameters

TValue

JSON-serializable argument type.

Parameters

identifier
String

An identifier for the property to set. For example, the value "someScope.someProp" will update the property someScope.someProp on the target instance.

value
TValue

JSON-serializable value.

cancellationToken
CancellationToken

A cancellation token to signal the cancellation of the operation. Specifying this parameter will override any default cancellations such as due to timeouts (DefaultAsyncTimeout) from being applied.

Returns

A ValueTask that represents the asynchronous invocation operation.

Implements

Applies to