JSObjectReferenceExtensions.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.IJSObjectReference jsObjectReference, string identifier, TimeSpan timeout);
static member GetValueAsync : Microsoft.JSInterop.IJSObjectReference * string * TimeSpan -> System.Threading.Tasks.ValueTask<'Value>
<Extension()>
Public Function GetValueAsync(Of TValue) (jsObjectReference As IJSObjectReference, identifier As String, timeout As TimeSpan) As ValueTask(Of TValue)
Type Parameters
- TValue
The JSON-serializable return type.
Parameters
- jsObjectReference
- IJSObjectReference
The IJSObjectReference.
- identifier
- String
An identifier for the property to read. For example, the value "someScope.someProp" will read the value of the property 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.