Class RenderedFragmentInvokeAsyncExtensions
- Namespace
- Bunit
- Assembly
- Bunit.Core.dll
InvokeAsync extensions methods on IRenderedFragmentBase.
public static class RenderedFragmentInvokeAsyncExtensions
- Inheritance
-
RenderedFragmentInvokeAsyncExtensions
- Inherited Members
Methods
InvokeAsync(IRenderedFragmentBase, Action)
Invokes the given workItem
in the context of the associated ITestRenderer.
public static Task InvokeAsync(this IRenderedFragmentBase renderedFragment, Action workItem)
Parameters
renderedFragment
IRenderedFragmentBaseThe rendered fragment whose dispatcher to invoke with.
workItem
ActionThe 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.
InvokeAsync(IRenderedFragmentBase, Func<Task>)
Invokes the given workItem
in the context of the associated ITestRenderer.
public static Task InvokeAsync(this IRenderedFragmentBase renderedFragment, Func<Task> workItem)
Parameters
renderedFragment
IRenderedFragmentBaseThe rendered component whose dispatcher to invoke with.
workItem
Func<Task>The work item to execute on the renderer's thread.
Returns
InvokeAsync<T>(IRenderedFragmentBase, Func<Task<T>>)
Invokes the given workItem
in the context of the associated ITestRenderer.
public static Task<T> InvokeAsync<T>(this IRenderedFragmentBase renderedFragment, Func<Task<T>> workItem)
Parameters
renderedFragment
IRenderedFragmentBaseThe rendered component whose dispatcher to invoke with.
workItem
Func<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
T
InvokeAsync<T>(IRenderedFragmentBase, Func<T>)
Invokes the given workItem
in the context of the associated ITestRenderer.
public static Task<T> InvokeAsync<T>(this IRenderedFragmentBase renderedFragment, Func<T> workItem)
Parameters
renderedFragment
IRenderedFragmentBaseThe rendered component whose dispatcher to invoke with.
workItem
Func<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
T