Class RenderedComponentInvokeAsyncExtensions
- Namespace
- Bunit
- Assembly
- bunit.dll
InvokeAsync extensions methods on IRenderedComponent<TComponent>.
public static class RenderedComponentInvokeAsyncExtensions
- Inheritance
-
RenderedComponentInvokeAsyncExtensions
- Inherited Members
Methods
InvokeAsync<TComponent>(IRenderedComponent<TComponent>, Action)
Invokes the given workItem in the context of the associated BunitRenderer.
public static Task InvokeAsync<TComponent>(this IRenderedComponent<TComponent> renderedComponent, Action workItem) where TComponent : IComponent
Parameters
renderedComponentIRenderedComponent<TComponent>The rendered fragment whose dispatcher to invoke with.
workItemActionThe work item to execute on the renderer's thread.
Returns
- Task
A Task that will be completed when the action has finished executing or is suspended by an asynchronous operation.
Type Parameters
TComponent
InvokeAsync<TComponent>(IRenderedComponent<TComponent>, Func<Task>)
Invokes the given workItem in the context of the associated BunitRenderer.
public static Task InvokeAsync<TComponent>(this IRenderedComponent<TComponent> renderedComponent, Func<Task> workItem) where TComponent : IComponent
Parameters
renderedComponentIRenderedComponent<TComponent>The rendered component whose dispatcher to invoke with.
workItemFunc<Task>The work item to execute on the renderer's thread.
Returns
Type Parameters
TComponent
InvokeAsync<TComponent, T>(IRenderedComponent<TComponent>, Func<Task<T>>)
Invokes the given workItem in the context of the associated BunitRenderer.
public static Task<T> InvokeAsync<TComponent, T>(this IRenderedComponent<TComponent> renderedComponent, Func<Task<T>> workItem) where TComponent : IComponent
Parameters
renderedComponentIRenderedComponent<TComponent>The rendered component whose dispatcher to invoke with.
workItemFunc<Task<T>>The work item to execute on the renderer's thread.
Returns
- Task<T>
A Task that will be completed when the action has finished executing, with the return value from
workItem.
Type Parameters
TComponentT
InvokeAsync<TComponent, T>(IRenderedComponent<TComponent>, Func<T>)
Invokes the given workItem in the context of the associated BunitRenderer.
public static Task<T> InvokeAsync<TComponent, T>(this IRenderedComponent<TComponent> renderedComponent, Func<T> workItem) where TComponent : IComponent
Parameters
renderedComponentIRenderedComponent<TComponent>The rendered component whose dispatcher to invoke with.
workItemFunc<T>The work item to execute on the renderer's thread.
Returns
- Task<T>
A Task that will be completed when the action has finished executing, with the return value from
workItem.
Type Parameters
TComponentT