IJSObjectReference.GetValueAsync 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
GetValueAsync<TValue>(String) |
Reads the value of the specified JavaScript property asynchronously. |
GetValueAsync<TValue>(String, CancellationToken) |
Reads the value of the specified JavaScript property asynchronously. |
GetValueAsync<TValue>(String)
- Source:
- IJSObjectReference.cs
Reads the value of the specified JavaScript property asynchronously.
public System.Threading.Tasks.ValueTask<TValue> GetValueAsync<TValue>(string identifier);
abstract member GetValueAsync : string -> System.Threading.Tasks.ValueTask<'Value>
Public Function GetValueAsync(Of TValue) (identifier As String) As ValueTask(Of TValue)
Type Parameters
- TValue
The JSON-serializable return type.
Parameters
- identifier
- String
An identifier for the property to read. For example, the value "someScope.someProp"
will read the value of the property someScope.someProp
on the target instance.
Returns
An instance of TValue
obtained by JSON-deserializing the return value.
Applies to
GetValueAsync<TValue>(String, CancellationToken)
- Source:
- IJSObjectReference.cs
Reads the value of the specified JavaScript property asynchronously.
public System.Threading.Tasks.ValueTask<TValue> GetValueAsync<TValue>(string identifier, System.Threading.CancellationToken cancellationToken);
abstract member GetValueAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Value>
Public Function GetValueAsync(Of TValue) (identifier As String, cancellationToken As CancellationToken) As ValueTask(Of TValue)
Type Parameters
- TValue
The JSON-serializable return type.
Parameters
- identifier
- String
An identifier for the property to read. For example, the value "someScope.someProp"
will read the value of the property window.someScope.someProp
.
- 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
An instance of TValue
obtained by JSON-deserializing the return value.