Search Results for

    Show / Hide Table of Contents

    Class NullObjectFactory<TObject>

    Implementation of INullObject and IFactory<TCreate>. Used to create an instance of a INullObject where IsNull is set to true by default.

    Inheritance
    Object
    Factory<TObject>
    NullObjectFactory<TObject>
    Implements
    IFactory<TObject>
    Inherited Members
    Factory<TObject>.SharedProductInstance
    Factory<TObject>.FactoryMode
    Factory<TObject>.Create()
    Factory<TObject>.Create(Object[])
    Factory<TObject>.CreateScope()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: BionicCode.Utilities.Net
    Assembly: BionicCode.Utilities.Net.Common.dll
    Syntax
    public class NullObjectFactory<TObject> : Factory<TObject>, IFactory<TObject> where TObject : INullObject
    Type Parameters
    Name Description
    TObject

    Constructors

    | Improve this Doc View Source

    NullObjectFactory(IFactory<TObject>)

    Initializes the NullObjectFactory<TObject> using a IFactory<TCreate> and its FactoryMode to set the FactoryMode.

    Declaration
    public NullObjectFactory(IFactory<TObject> factory)
    Parameters
    Type Name Description
    IFactory<TObject> factory

    The IFactory<TCreate> to create instances of type TObject.

    | Improve this Doc View Source

    NullObjectFactory(Func<TObject>)

    Initializes the NullObjectFactory<TObject> using a factory method delegate using Singleton.

    Declaration
    public NullObjectFactory(Func<TObject> factoryMethod)
    Parameters
    Type Name Description
    Func<TObject> factoryMethod

    The delegate to create instances of type TObject.

    | Improve this Doc View Source

    NullObjectFactory(Func<TObject>, FactoryMode)

    Initializes the NullObjectFactory<TObject> using a factory method delegate using Singleton.

    Declaration
    public NullObjectFactory(Func<TObject> factoryMethod, FactoryMode factoryMode)
    Parameters
    Type Name Description
    Func<TObject> factoryMethod

    The delegate to create instances of type TObject.

    FactoryMode factoryMode

    The lifetime scope of the created instance.

    Methods

    | Improve this Doc View Source

    CreateInstance()

    Implementation to create and initialize instances of type TObject.

    Declaration
    protected override TObject CreateInstance()
    Returns
    Type Description
    TObject

    An instance of type TObject.

    Overrides
    BionicCode.Utilities.Net.Factory<TObject>.CreateInstance()
    | Improve this Doc View Source

    CreateInstance(Object[])

    Implementation to create and initialize instances of type TObject.

    Declaration
    protected override TObject CreateInstance(params object[] args)
    Parameters
    Type Name Description
    Object[] args

    A variable list of arguments.

    Returns
    Type Description
    TObject

    An instance of type TObject.

    Overrides
    BionicCode.Utilities.Net.Factory<TObject>.CreateInstance(System.Object[])

    Implements

    IFactory<TCreate>

    Extension Methods

    HelperExtensionsCommon.ToDictionary(Object)
    HelperExtensionsCommon.ToFlatDictionary(Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX