Class ComponentState
Class ComponentState. Implements the ComponentState
Inherited Members
Namespace: FastMoq.Web.Blazor.Models
Assembly: FastMoq.Web.dll
Syntax
public class ComponentState
Constructors
ComponentState(object?, TestRenderer)
Initializes a new instance of the ComponentState class.
Declaration
public ComponentState(object? obj, TestRenderer renderer)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object. |
| TestRenderer | renderer | The renderer. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | renderer |
| ArgumentNullException | services |
Properties
Component
Gets the component.
Declaration
public IComponent? Component { get; }
Property Value
| Type | Description |
|---|---|
| IComponent | The component. |
ComponentId
Gets the component identifier.
Declaration
public int ComponentId { get; }
Property Value
| Type | Description |
|---|---|
| int | The component identifier. |
ComponentType
Gets or sets the type of the component.
Declaration
protected Type ComponentType { get; set; }
Property Value
| Type | Description |
|---|---|
| Type | The type of the component. |
CurrentRenderTree
Gets the current render tree.
Declaration
public RenderTreeBuilder? CurrentRenderTree { get; }
Property Value
| Type | Description |
|---|---|
| RenderTreeBuilder | The current render tree. |
IsComponentBase
Gets a value indicating whether this instance is component base.
Declaration
public bool IsComponentBase { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
ParentComponentState
Gets the state of the parent component.
Declaration
public ComponentState? ParentComponentState { get; }
Property Value
| Type | Description |
|---|---|
| ComponentState | The state of the parent component. |
Methods
GetOrCreateRenderedComponent(Type)
Gets the or create rendered component.
Declaration
public IRenderedComponentBase<ComponentBase>? GetOrCreateRenderedComponent(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type. |
Returns
| Type | Description |
|---|---|
| IRenderedComponentBase<ComponentBase> | System ofNullable<IRenderedComponentBase<ComponentBase>> of the or create rendered component. |
GetOrCreateRenderedComponent<T>()
Gets the or create rendered component.
Declaration
public virtual IRenderedComponentBase<T>? GetOrCreateRenderedComponent<T>() where T : ComponentBase
Returns
| Type | Description |
|---|---|
| IRenderedComponentBase<T> | System ofNullable<IRenderedComponentBase<T>> of the or create rendered component. |
Type Parameters
| Name | Description |
|---|---|
| T |