Search Results for

    Show / Hide Table of Contents

    Class ObjectEntityTypeProcessor

    Inheritance
    object
    ObjectEntityTypeProcessor
    Implements
    IBaseDataSetProcessor
    ITaskProcessor
    IProcessor
    IDisposable
    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.FinancialServices.Processors.Transactional
    Assembly: LemonEdge.API.Core.FinancialServices.dll
    Syntax
    [ServerTask("Object Entity Type Attribute Bulk Update", "7066167E-6A69-49E3-A1C4-C298B2EADBA7", typeof(BaseObjectTypeUpdaterParameters))]
    public class ObjectEntityTypeProcessor : IBaseDataSetProcessor, ITaskProcessor, IProcessor, IDisposable

    Constructors

    ObjectEntityTypeProcessor()

    Declaration
    public ObjectEntityTypeProcessor()

    ObjectEntityTypeProcessor(IEntityUpdater, IReadOnlyCache, UserInfo)

    Declaration
    public ObjectEntityTypeProcessor(IEntityUpdater updater, IReadOnlyCache cache, UserInfo user)
    Parameters
    Type Name Description
    IEntityUpdater updater
    IReadOnlyCache cache
    UserInfo user

    Properties

    Cache

    A local cache for performance

    Declaration
    public IReadOnlyCache Cache { get; }
    Property Value
    Type Description
    IReadOnlyCache

    IgnoreEvents

    Indicates the processor should ignore changes to any items within the processor

    Normally used when the processor responds to an event and wants to prevent any other responses while it finishes processing that change

    Declaration
    public bool IgnoreEvents { get; set; }
    Property Value
    Type Description
    bool

    Loaded

    Flag to indicate if the processor has been fully loaded

    Declaration
    public bool Loaded { get; }
    Property Value
    Type Description
    bool

    ObjectEntityType

    Declaration
    public IObjectEntityType ObjectEntityType { get; }
    Property Value
    Type Description
    IObjectEntityType

    Reporter

    A reporter to provide feedback to a log, or client depending on the context the process is running under

    Declaration
    public BusyProgressReporter Reporter { get; set; }
    Property Value
    Type Description
    BusyProgressReporter

    Updater

    A context to ensure the process can query, load and modify all LemonEdge data

    Declaration
    public IEntityUpdater Updater { get; }
    Property Value
    Type Description
    IEntityUpdater

    User

    The current logged in user the process is running under

    Declaration
    public UserInfo User { get; }
    Property Value
    Type Description
    UserInfo

    Methods

    AddToDataSetToProcess(IBaseEntity, EntityOperation)

    If a modified item belongs in the processor (IsChangedItemPartOfDataSet(IBaseEntity)), this adds the item to the processor if it already isn't a member of it

    Declaration
    public void AddToDataSetToProcess(IBaseEntity item, EntityOperation operationType)
    Parameters
    Type Name Description
    IBaseEntity item

    The item to add to the processor

    EntityOperation operationType

    The type of operation that modified the item. Useful as deleted items can often be treated differently in a processor.

    Dispose()

    Declaration
    public void Dispose()

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Init(ITaskRunner, ServerTaskParameter)

    Initializes the task processor with the parameters for processing the task

    Declaration
    public Task Init(ITaskRunner runner, ServerTaskParameter ProcessTaskParameter)
    Parameters
    Type Name Description
    ITaskRunner runner

    The context within which the task is being processed

    ServerTaskParameter ProcessTaskParameter

    The parameter for running this task

    Returns
    Type Description
    Task

    A task indicating the completion of the operationn

    IsChangedItemPartOfDataSet(IBaseEntity)

    This function returns true if the specified modified item belongs in this processor.

    Non modified items will just automatically be loaded by the processor anyway, this is more to keep track of items as they are changed and should be added to the processor without having to reload

    Declaration
    public bool IsChangedItemPartOfDataSet(IBaseEntity item)
    Parameters
    Type Name Description
    IBaseEntity item

    The item to check if it belongs in this processor

    Returns
    Type Description
    bool

    True if the specified item belongs in this processor

    Load()

    A thread safe implementation to load all required data for the processor

    Once completed Loaded should return true.

    Declaration
    public Task Load()
    Returns
    Type Description
    Task

    A task indicating the completion of the load operation

    ProcessTask(CancellationToken)

    A function that implements the process for this task using the parameters provided during Init(ITaskRunner, ServerTaskParameter)

    Declaration
    public Task<object> ProcessTask(CancellationToken cancel)
    Parameters
    Type Name Description
    CancellationToken cancel

    A cancellation token for cancelling any long running task

    Returns
    Type Description
    Task<object>

    An optional object detailing the result which can be converted using ITaskResultHandler into a ServerTaskResult, or is a ServerTaskResult itself

    UpdateAllObjectEntityAttributes()

    Declaration
    public Task UpdateAllObjectEntityAttributes()
    Returns
    Type Description
    Task

    Implements

    IBaseDataSetProcessor
    ITaskProcessor
    IProcessor
    IDisposable

    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)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.