FastMoq
Search Results for

    Show / Hide Table of Contents

    Class ComponentState

    Class ComponentState. Implements the ComponentState

    Inheritance
    object
    ComponentState
    ComponentState<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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

    true if this instance is component base; otherwise, false.

    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

    Extension Methods

    ObjectExtensions.RaiseIfNull<T>(T?, string?, string?, int?, string?)
    TestClassExtensions.GetFieldValue<TObject>(TObject, string, TObject?)
    TestClassExtensions.GetField<TObject>(TObject, string)
    TestClassExtensions.GetMemberName<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMember<T, TValue>(T, Expression<Func<T, TValue>>)
    TestClassExtensions.GetMethodValue<TObject>(TObject, string, object?, params object[])
    TestClassExtensions.GetMethod<TObject>(TObject, string)
    TestClassExtensions.GetPropertyValue<TObject>(TObject, string, object?)
    TestClassExtensions.GetProperty<TObject>(TObject, string)
    TestClassExtensions.SetFieldValue<TObject>(TObject, string, object?)
    TestClassExtensions.SetPropertyValue<TObject>(TObject, string, object?)
    MockerHttpMoqExtensions.SetupHttpMessage(object, Func<HttpResponseMessage>, Expression?, Expression?)
    MockerHttpMoqExtensions.SetupMessageAsync<TMock, TReturn>(object, Expression<Func<TMock, Task<TReturn>>>, Func<TReturn>)
    MockerHttpMoqExtensions.SetupMessageProtectedAsync<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessageProtected<TMock, TReturn>(object, string, Func<TReturn>, params object?[]?)
    MockerHttpMoqExtensions.SetupMessage<TMock, TReturn>(object, Expression<Func<TMock, TReturn>>, Func<TReturn>)
    TestClassExtensions.GetFieldInfo<TType>(object, string)
    TestClassExtensions.GetFieldValue<T>(object?, FieldInfo)
    TestClassExtensions.GetFieldValue<T, TType>(object, string)

    See Also

    ComponentState
    In this article
    Back to top
    Generated 2026-04-08 12:38 UTC