Search Results for

    Show / Hide Table of Contents

    Class DataSetProcessorFactory

    A helper factory that loads all implementations of IBaseDataSetProcessorFactory and allows the system to create them automatically where required

    Inheritance
    object
    DataSetProcessorFactory
    Implements
    IDataSetProcessorFactory
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.API.Core.Processors.Core
    Assembly: LemonEdge.API.dll
    Syntax
    public class DataSetProcessorFactory : IDataSetProcessorFactory

    Constructors

    DataSetProcessorFactory(IDomainContextEventHandler, IFactoryInjector, IReflectionHelper)

    Declaration
    public DataSetProcessorFactory(IDomainContextEventHandler handler, IFactoryInjector factory, IReflectionHelper reflectionHelper)
    Parameters
    Type Name Description
    IDomainContextEventHandler handler
    IFactoryInjector factory
    IReflectionHelper reflectionHelper

    Properties

    Instance

    Declaration
    public static IDataSetProcessorFactory Instance { get; set; }
    Property Value
    Type Description
    IDataSetProcessorFactory

    Methods

    Create(IBaseEntity, IEntityUpdater, IReadOnlyCache, UserInfo, Type)

    Returns a new instance of the processor (either specified via processorType, or the default)

    Declaration
    public IBaseDataSetProcessor Create(IBaseEntity forItem, IEntityUpdater updater, IReadOnlyCache cache, UserInfo user, Type processorType = null)
    Parameters
    Type Name Description
    IBaseEntity forItem

    The item to create a processor for

    IEntityUpdater updater

    A context for querying and updating all items in the LemonEdge platform

    IReadOnlyCache cache

    A local current cache

    UserInfo user

    The current logged in user

    Type processorType

    An optional type when requiring a processor of a specific type if it can be involved in more than one

    Returns
    Type Description
    IBaseDataSetProcessor

    A new instance of the processor (either specified via processorType, or the default)

    GetPossibleSaveProcessorTypes(Type)

    Returns an enumeration of processor types that can be created for the specified entity type.

    Also includes a function for each one which specifies if the type is valid against an instance of the entity.

    Declaration
    public IEnumerable<(Type ProcessorType, Func<IBaseEntity, bool> BelongsInProcessorType)> GetPossibleSaveProcessorTypes(Type forItemType)
    Parameters
    Type Name Description
    Type forItemType

    The type of item to return possible processor types that can work against them

    Returns
    Type Description
    IEnumerable<(Type ProcessorType, Func<IBaseEntity, bool> BelongsInProcessorType)>

    An enumeration of processor types that can be created for the specified entity type

    HasProcessor(Type)

    Returns true if the specified entity type has one or more associated processors that can work with it

    Declaration
    public bool HasProcessor(Type type)
    Parameters
    Type Name Description
    Type type

    The type of entity to check if a processor works with it

    Returns
    Type Description
    bool

    True if the specified entity type has one or more associated processors that can work with it

    HasSaveProcessor(Type)

    Returns true if the specified entity type has an associated processor that implements IBaseDataSetProcessorWithDBSave

    Declaration
    public bool HasSaveProcessor(Type type)
    Parameters
    Type Name Description
    Type type

    The type of entity to check if a processor of type IBaseDataSetProcessorWithDBSave works with it

    Returns
    Type Description
    bool

    True if the specified entity type has an associated processor that implements IBaseDataSetProcessorWithDBSave

    Implements

    IDataSetProcessorFactory

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)

    See Also

    IBaseDataSetProcessorFactory
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.