Table of Contents

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

renderedComponent IRenderedComponent<TComponent>

The rendered fragment whose dispatcher to invoke with.

workItem Action

The 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

renderedComponent IRenderedComponent<TComponent>

The rendered component whose dispatcher to invoke with.

workItem Func<Task>

The work item to execute on the renderer's thread.

Returns

Task

A Task that will be completed when the action has finished executing.

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

renderedComponent IRenderedComponent<TComponent>

The 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

TComponent
T

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

renderedComponent IRenderedComponent<TComponent>

The 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

TComponent
T
.NET Foundation

Supported by the .NET Foundation.