Table of Contents

Class ContainerFragment

Namespace
Bunit.Rendering
Assembly
bunit.dll

Creates an instance of the ContainerFragment, which is used when a fragment is rendered inside a test contexts render tree. It is primarily used to be able to find the starting point to return.

public sealed class ContainerFragment : IComponent
Inheritance
ContainerFragment
Implements
Inherited Members
Extension Methods

Constructors

ContainerFragment()

public ContainerFragment()

Methods

Attach(RenderHandle)

Attaches the component to a RenderHandle.

public void Attach(RenderHandle renderHandle)

Parameters

renderHandle RenderHandle

A RenderHandle that allows the component to be rendered.

SetParametersAsync(ParameterView)

Sets parameters supplied by the component's parent in the render tree.

public Task SetParametersAsync(ParameterView parameters)

Parameters

parameters ParameterView

The parameters.

Returns

Task

A Task that completes when the component has finished updating and rendering itself.

Remarks

The SetParametersAsync(ParameterView) method should be passed the entire set of parameter values each time SetParametersAsync(ParameterView) is called. It not required that the caller supply a parameter value for all parameters that are logically understood by the component.

Wrap(RenderFragment)

Wraps the wrappingTarget in a ContainerFragment.

public static RenderFragment Wrap(RenderFragment wrappingTarget)

Parameters

wrappingTarget RenderFragment

Returns

RenderFragment
.NET Foundation

Supported by the .NET Foundation.