JSRuntimeExtensions.GetValueAsync<TValue> 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.
Reads the value of the specified JavaScript property asynchronously.
public static System.Threading.Tasks.ValueTask<TValue> GetValueAsync<TValue>(this Microsoft.JSInterop.IJSRuntime jsRuntime, string identifier, TimeSpan timeout);
static member GetValueAsync : Microsoft.JSInterop.IJSRuntime * string * TimeSpan -> System.Threading.Tasks.ValueTask<'Value>
<Extension()>
Public Function GetValueAsync(Of TValue) (jsRuntime As IJSRuntime, identifier As String, timeout As TimeSpan) As ValueTask(Of TValue)
Type Parameters
- TValue
The JSON-serializable return type.
Parameters
- jsRuntime
- IJSRuntime
The IJSRuntime.
- 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
.
- timeout
- TimeSpan
The duration after which to cancel the async operation. Overrides default timeouts (DefaultAsyncTimeout).
Returns
An instance of TValue
obtained by JSON-deserializing the return value.