FastMoq
Search Results for

    Show / Hide Table of Contents

    Class InstanceModel<TClass>

    Class InstanceModel represents a type and how to create that type's instance. Implements the InstanceModel

    Inheritance
    object
    InstanceModel
    InstanceModel<TClass>
    Implements
    IInstanceModel
    IHistoryModel
    Inherited Members
    InstanceModel.Arguments
    InstanceModel.Type
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: FastMoq.Models
    Assembly: FastMoq.Core.dll
    Syntax
    [ExcludeFromCodeCoverage]
    public class InstanceModel<TClass> : InstanceModel, IInstanceModel, IHistoryModel
    Type Parameters
    Name Description
    TClass

    The type of the t class.

    Constructors

    InstanceModel()

    Declaration
    public InstanceModel()

    InstanceModel(IInstanceModel)

    Declaration
    public InstanceModel(IInstanceModel model)
    Parameters
    Type Name Description
    IInstanceModel model

    InstanceModel(Func<Mocker, object?, TClass>?)

    Declaration
    public InstanceModel(Func<Mocker, object?, TClass>? createFunc)
    Parameters
    Type Name Description
    Func<Mocker, object, TClass> createFunc

    InstanceModel(Func<Mocker, object?, TClass>?, List<object?>)

    Declaration
    public InstanceModel(Func<Mocker, object?, TClass>? createFunc, List<object?> arguments)
    Parameters
    Type Name Description
    Func<Mocker, object, TClass> createFunc
    List<object> arguments

    InstanceModel(Func<Mocker, TClass>?)

    Declaration
    public InstanceModel(Func<Mocker, TClass>? createFunc)
    Parameters
    Type Name Description
    Func<Mocker, TClass> createFunc

    InstanceModel(Func<Mocker, TClass>?, List<object?>)

    Declaration
    public InstanceModel(Func<Mocker, TClass>? createFunc, List<object?> arguments)
    Parameters
    Type Name Description
    Func<Mocker, TClass> createFunc
    List<object> arguments

    Properties

    CreateFunc

    Gets or sets the create function.

    Declaration
    public InstanceFunction? CreateFunc { get; set; }
    Property Value
    Type Description
    InstanceFunction

    The create function.

    InstanceType

    Gets the type of the instance.

    Declaration
    public override Type InstanceType { get; }
    Property Value
    Type Description
    Type

    The type of the instance.

    Overrides
    InstanceModel.InstanceType

    Implements

    IInstanceModel
    IHistoryModel

    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

    IInstanceModel
    InstanceModel<TClass>
    InstanceModel
    ConstructorModel
    IInstanceModel
    InstanceModel<TClass>
    InstanceModel
    ConstructorModel
    InstanceModel
    InstanceModel
    In this article
    Back to top
    Generated 2026-04-08 12:38 UTC