ComponentCallContext Class
A call of a function of the host by a component.
public sealed class ComponentCallContextProperties
| Name | Description |
|---|---|
| CancellationToken | Gets the token that is cancelled when the component cancels an asynchronous call. |
| Store | Gets the store of the component. |
| Type | Gets the type of the function, as the component imports it. |
CancellationToken
WasmComponent.csGets the token that is cancelled when the component cancels an asynchronous call.
public CancellationToken CancellationToken { get; init; }Property value
Store
WasmComponent.csType
WasmComponent.csGets the type of the function, as the component imports it.
public ComponentFunctionType Type { get; }Property value
Methods
| Name | Description |
|---|---|
| RunInBackground(Func<Task>) | Runs an operation of the host that continues after the call returns, such as a copy between a stream of a component and a .NET stream: the store waits for it when the components wait, and its continuations run on the thread of the store. |
RunInBackground(Func<Task>)
WasmComponent.csRuns an operation of the host that continues after the call returns, such as a copy between a stream of a component and a .NET stream: the store waits for it when the components wait, and its continuations run on the thread of the store.
Parameters
operationFunc<Task>- The operation.