Table of Contents

Interface IRenderedComponent<TComponent>

Namespace
Bunit
Assembly
bunit.dll

Represents a rendered component.

public interface IRenderedComponent<out TComponent> : IDisposable where TComponent : IComponent

Type Parameters

TComponent
Inherited Members
Extension Methods

Properties

ComponentId

Gets the id of the rendered component or fragment.

int ComponentId { get; }

Property Value

int

Instance

Gets the component under test.

TComponent Instance { get; }

Property Value

TComponent

IsDisposed

Gets a value indicating whether the rendered component or fragment has been disposed by the BunitRenderer.

bool IsDisposed { get; }

Property Value

bool

Markup

Gets the HTML markup from the rendered fragment/component.

string Markup { get; }

Property Value

string

Nodes

Gets the AngleSharp AngleSharp.Dom.INodeList based on the HTML markup from the rendered fragment/component.

INodeList Nodes { get; }

Property Value

INodeList

RenderCount

Gets the total number times the fragment has been through its render life-cycle.

int RenderCount { get; }

Property Value

int

Services

Gets the IServiceProvider used when rendering the component.

IServiceProvider Services { get; }

Property Value

IServiceProvider

Events

OnAfterRender

Adds or removes an event handler that will be triggered after each render of this IRenderedComponent<TComponent>.

event EventHandler? OnAfterRender

Event Type

EventHandler

OnMarkupUpdated

An event that is raised after the markup of the IRenderedComponent<TComponent> is updated.

event EventHandler? OnMarkupUpdated

Event Type

EventHandler
.NET Foundation

Supported by the .NET Foundation.