Search Results for

    Show / Hide Table of Contents

    Class StepChangeProcessor

    Inheritance
    object
    BaseTransactionProcessor
    StepChangeProcessor
    Implements
    IStepChangeProcessor
    ILockable
    ITaskProcessor
    ICanBeRevertedTransactionProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    IProcessor
    IDisposable
    Inherited Members
    BaseTransactionProcessor.RollbackChanges()
    BaseTransactionProcessor.ProcessOnDBSave()
    BaseTransactionProcessor.GetAllItemsInTransactionProcessor(bool)
    BaseTransactionProcessor.TaskInit(IEntityUpdater, IReadOnlyCache, UserInfo, BusyProgressReporter)
    BaseTransactionProcessor.StatusValidate(IHeaderTransactionalEntity, IEntityUpdater, IReadOnlyCache, UserInfo, IEntityDescriptorFactory, bool, bool)
    BaseTransactionProcessor.ForceLoad()
    BaseTransactionProcessor.ProcessTransaction()
    BaseTransactionProcessor.Validate()
    BaseTransactionProcessor.ExecuteFormula<T>(string, IBaseEntity)
    BaseTransactionProcessor.ProcessCancel(ITransactionalEntity, bool, BaseTransactionProcessor)
    BaseTransactionProcessor.ProcessCorrect(ITransactionalEntity, TransactionStatus, BaseTransactionProcessor)
    BaseTransactionProcessor.UpdateFinacialDate(ITransactionalEntity)
    BaseTransactionProcessor.UpdateCommonProperties()
    BaseTransactionProcessor.UpdateCommonProperties(IHeaderTransactionalEntity, ITransactionalEntity)
    BaseTransactionProcessor.UpdateAllStatuses(IHeaderTransactionalEntity)
    BaseTransactionProcessor.Dispose(bool)
    BaseTransactionProcessor.DisposeUnManagedState()
    BaseTransactionProcessor.Dispose()
    BaseTransactionProcessor.Services
    BaseTransactionProcessor.FinancialDateCalculator
    BaseTransactionProcessor.CancelledItems
    BaseTransactionProcessor.CorrectedItems
    BaseTransactionProcessor.RootCorrectedEntity
    BaseTransactionProcessor.RootCancelledEntity
    BaseTransactionProcessor.CanCancel
    BaseTransactionProcessor.CommitToFinalizeRequiresTask
    BaseTransactionProcessor.AnyChangeRequiresTaskRecalc
    BaseTransactionProcessor.Reporter
    BaseTransactionProcessor.Updater
    BaseTransactionProcessor.Cache
    BaseTransactionProcessor.User
    BaseTransactionProcessor.IgnoreEvents
    BaseTransactionProcessor.Order
    BaseTransactionProcessor.SaveProcessed
    BaseTransactionProcessor.CanLock
    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("Recalculate Step Change", "8F80D832-906B-4FC8-B0DE-F4662A18183D", typeof(StepChangeProcessParameter), DefaultForHasSaveProcessingTask = typeof(IStepChange))]
    public class StepChangeProcessor : BaseTransactionProcessor, IStepChangeProcessor, ILockable, ITaskProcessor, ICanBeRevertedTransactionProcessor, IBaseDataSetProcessorWithDBSave, IBaseDataSetProcessor, IProcessor, IDisposable

    Constructors

    StepChangeProcessor(IEntityUpdater, IReadOnlyCache, UserInfo, TransactionProcessorFactory, IServiceContext, IPathSplitIdProvider, IRuleAmountUpdaterFactory)

    Declaration
    public StepChangeProcessor(IEntityUpdater updater, IReadOnlyCache cache, UserInfo user, TransactionProcessorFactory transactionProcessorFactory, IServiceContext services, IPathSplitIdProvider pathSplitProvider, IRuleAmountUpdaterFactory ruleAmountUpdaterFactory)
    Parameters
    Type Name Description
    IEntityUpdater updater
    IReadOnlyCache cache
    UserInfo user
    TransactionProcessorFactory transactionProcessorFactory
    IServiceContext services
    IPathSplitIdProvider pathSplitProvider
    IRuleAmountUpdaterFactory ruleAmountUpdaterFactory

    StepChangeProcessor(IServiceContext, IPathSplitIdProvider, IRuleAmountUpdaterFactory)

    Declaration
    public StepChangeProcessor(IServiceContext services, IPathSplitIdProvider pathSplitProvider, IRuleAmountUpdaterFactory ruleAmountUpdaterFactory)
    Parameters
    Type Name Description
    IServiceContext services
    IPathSplitIdProvider pathSplitProvider
    IRuleAmountUpdaterFactory ruleAmountUpdaterFactory

    Properties

    Algorithms

    Declaration
    public IEnumerable<IStepChangeAlgorithm> Algorithms { get; }
    Property Value
    Type Description
    IEnumerable<IStepChangeAlgorithm>

    Loaded

    Flag to indicate if the processor has been fully loaded

    Declaration
    public override bool Loaded { get; }
    Property Value
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.Loaded

    Movements

    The movements loaded from the StepChange entity for this operation

    Declaration
    public IEnumerable<IStepChangeMovement> Movements { get; }
    Property Value
    Type Description
    IEnumerable<IStepChangeMovement>

    Rebalances

    Declaration
    public IEnumerable<IStepChangeRebalance> Rebalances { get; }
    Property Value
    Type Description
    IEnumerable<IStepChangeRebalance>

    RootTransactionEntity

    The root transaction entity for this transaction processor

    Declaration
    public override IHeaderTransactionalEntity RootTransactionEntity { get; }
    Property Value
    Type Description
    IHeaderTransactionalEntity
    Overrides
    BaseTransactionProcessor.RootTransactionEntity

    StepChange

    The root step change record this processor is responsible for

    Declaration
    public IStepChange StepChange { get; }
    Property Value
    Type Description
    IStepChange

    StepChangeTransactions

    Declaration
    public ITransactionProcessor StepChangeTransactions { get; }
    Property Value
    Type Description
    ITransactionProcessor

    SubProcessors

    An enumeration of all sub processors for this processor

    For instance the IBlendTransactionProcessor will have sub processors for processing each transaction it creates

    Declaration
    public override IEnumerable<BaseTransactionProcessor> SubProcessors { get; }
    Property Value
    Type Description
    IEnumerable<BaseTransactionProcessor>
    Overrides
    BaseTransactionProcessor.SubProcessors

    Methods

    AddAlgorithm(IStepChangeAlgorithm)

    Declaration
    public void AddAlgorithm(IStepChangeAlgorithm algorithm)
    Parameters
    Type Name Description
    IStepChangeAlgorithm algorithm

    AddMovement(IStepChangeMovement)

    Declaration
    public void AddMovement(IStepChangeMovement movement)
    Parameters
    Type Name Description
    IStepChangeMovement movement

    AddRebalance(IStepChangeRebalance)

    Declaration
    public void AddRebalance(IStepChangeRebalance rebalance)
    Parameters
    Type Name Description
    IStepChangeRebalance rebalance

    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 override 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.

    Overrides
    BaseTransactionProcessor.AddToDataSetToProcess(IBaseEntity, EntityOperation)

    Calculate()

    Declaration
    public Task Calculate()
    Returns
    Type Description
    Task

    CanWrite(IBaseEntity)

    Indicates if the processor allows items to be written to depending on the users permission and transaction status

    Declaration
    public override bool CanWrite(IBaseEntity baseEntity)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    Returns
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.CanWrite(IBaseEntity)

    CustomUpdateCancelCorrectedItem(EntityDescriptor, ITransactionalEntity, ITransactionalEntity, bool)

    Provides the implementing class an opportunity to update the cancel, or corrected record generated automatically by the processor

    Declaration
    protected override Task CustomUpdateCancelCorrectedItem(EntityDescriptor type, ITransactionalEntity original, ITransactionalEntity cancelCorrected, bool isCorrectionRecord)
    Parameters
    Type Name Description
    EntityDescriptor type

    The type of the entity being cancelled or corrected

    ITransactionalEntity original

    The original entity record that has a cancel or corrected record generated for it

    ITransactionalEntity cancelCorrected

    The cancel or corrected record, indicated by isCorrectionRecord

    bool isCorrectionRecord

    Indicates cancelCorrected is a correction record. It is a cancelling record otherwise.

    Returns
    Type Description
    Task
    Overrides
    BaseTransactionProcessor.CustomUpdateCancelCorrectedItem(EntityDescriptor, ITransactionalEntity, ITransactionalEntity, bool)

    DeleteAlgorithmTransactions()

    Before running a step change, existing transactions generated from algorithms should be deleted.

    Declaration
    protected Task DeleteAlgorithmTransactions()
    Returns
    Type Description
    Task

    DisposeManagedState()

    Declaration
    protected override void DisposeManagedState()
    Overrides
    BaseTransactionProcessor.DisposeManagedState()

    EqualizeParallelSplitTransaction(ITransaction, ITransaction, ITransactionProcessor, ISplitTransaction, (IEnumerable<ITransaction>, IEnumerable<ITransactionAllocated>), bool)

    Declaration
    public Task<ITransaction> EqualizeParallelSplitTransaction(ITransaction original, ITransaction updated, ITransactionProcessor updatedProcessor, ISplitTransaction split, (IEnumerable<ITransaction>, IEnumerable<ITransactionAllocated>) priorAllocations, bool updateDates)
    Parameters
    Type Name Description
    ITransaction original
    ITransaction updated
    ITransactionProcessor updatedProcessor
    ISplitTransaction split
    (IEnumerable<ITransaction>, IEnumerable<ITransactionAllocated>) priorAllocations
    bool updateDates
    Returns
    Type Description
    Task<ITransaction>

    EqualizeParallelSplitTransaction(Guid, IEnumerable<ISplitTransactionLine>, bool)

    Declaration
    public Task<IEnumerable<ITransaction>> EqualizeParallelSplitTransaction(Guid splitTransactionID, IEnumerable<ISplitTransactionLine> lines, bool updateDates)
    Parameters
    Type Name Description
    Guid splitTransactionID
    IEnumerable<ISplitTransactionLine> lines
    bool updateDates
    Returns
    Type Description
    Task<IEnumerable<ITransaction>>

    EqualizeParallelSplitTransactions(bool, bool)

    Declaration
    public Task<IEnumerable<ITransaction>> EqualizeParallelSplitTransactions(bool includeCommitted, bool updateDates)
    Parameters
    Type Name Description
    bool includeCommitted
    bool updateDates
    Returns
    Type Description
    Task<IEnumerable<ITransaction>>

    EqualizeRootTransaction(ITransaction, List<Guid>, decimal, decimal, bool)

    Declaration
    public Task<IEnumerable<ITransaction>> EqualizeRootTransaction(ITransaction rootTransaction, List<Guid> processedAlgorithms, decimal progress, decimal progressInc, bool updateDates)
    Parameters
    Type Name Description
    ITransaction rootTransaction
    List<Guid> processedAlgorithms
    decimal progress
    decimal progressInc
    bool updateDates
    Returns
    Type Description
    Task<IEnumerable<ITransaction>>

    EqualizeTransaction(TransactionProcessor, ITransaction, ITransaction, (IEnumerable<ITransaction>, IEnumerable<ITransactionAllocated>), bool)

    Declaration
    public Task<ITransaction> EqualizeTransaction(TransactionProcessor processor, ITransaction sourceTransaction, ITransaction header, (IEnumerable<ITransaction>, IEnumerable<ITransactionAllocated>) priorAllocations, bool updateDates)
    Parameters
    Type Name Description
    TransactionProcessor processor
    ITransaction sourceTransaction
    ITransaction header
    (IEnumerable<ITransaction>, IEnumerable<ITransactionAllocated>) priorAllocations
    bool updateDates
    Returns
    Type Description
    Task<ITransaction>

    EqualizeTransactions(IEnumerable<ITransaction>, bool, bool)

    Declaration
    public Task EqualizeTransactions(IEnumerable<ITransaction> sourceTransactions, bool includeCommitted, bool updateDates)
    Parameters
    Type Name Description
    IEnumerable<ITransaction> sourceTransactions
    bool includeCommitted
    bool updateDates
    Returns
    Type Description
    Task

    GetAllItemsInThisProcessorExcludingSubProcessors()

    Returns all items in this base processor - Used by the system when reverting the status of a finalized transaction back to in progress

    Declaration
    public override IEnumerable<IBaseEntity> GetAllItemsInThisProcessorExcludingSubProcessors()
    Returns
    Type Description
    IEnumerable<IBaseEntity>

    An enumeration of all items in this transactional processor

    Overrides
    BaseTransactionProcessor.GetAllItemsInThisProcessorExcludingSubProcessors()

    GetTransactionToEqualize(bool)

    Declaration
    public Task<IList<ITransaction>> GetTransactionToEqualize(bool includeCommitted)
    Parameters
    Type Name Description
    bool includeCommitted
    Returns
    Type Description
    Task<IList<ITransaction>>

    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 override 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

    Overrides
    BaseTransactionProcessor.IsChangedItemPartOfDataSet(IBaseEntity)

    IsLocked(IBaseEntity)

    Indicates if this item is currently locked. True if status is finalized or cancelled. Can be changed by the user in the UI to modify finalized transactions which this will process as a cancel/correct

    Declaration
    public override bool IsLocked(IBaseEntity baseEntity)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    Returns
    Type Description
    bool

    true if it can be unlocked to enable updates, otherwise false

    Overrides
    BaseTransactionProcessor.IsLocked(IBaseEntity)

    KeepTransactionDateConsistent()

    Declaration
    protected override bool KeepTransactionDateConsistent()
    Returns
    Type Description
    bool
    Overrides
    BaseTransactionProcessor.KeepTransactionDateConsistent()

    Load()

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

    Once completed Loaded should return true.

    Declaration
    public override Task Load()
    Returns
    Type Description
    Task

    A task indicating the completion of the load operation

    Overrides
    BaseTransactionProcessor.Load()

    LoadLight()

    loads enough for ui interaction

    Declaration
    public Task LoadLight()
    Returns
    Type Description
    Task

    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

    RecreateAlgorithm(IAlgorithmRun, ITransaction, decimal, decimal)

    Declaration
    public Task<IEnumerable<ITransaction>> RecreateAlgorithm(IAlgorithmRun originalAlgorithm, ITransaction transaction, decimal toPct, decimal currentPct)
    Parameters
    Type Name Description
    IAlgorithmRun originalAlgorithm
    ITransaction transaction
    decimal toPct
    decimal currentPct
    Returns
    Type Description
    Task<IEnumerable<ITransaction>>

    RemoveAlgorithm(IStepChangeAlgorithm)

    Declaration
    public void RemoveAlgorithm(IStepChangeAlgorithm algorithm)
    Parameters
    Type Name Description
    IStepChangeAlgorithm algorithm

    RemoveMovement(IStepChangeMovement)

    Declaration
    public void RemoveMovement(IStepChangeMovement movement)
    Parameters
    Type Name Description
    IStepChangeMovement movement

    RemoveRebalance(IStepChangeRebalance)

    Declaration
    public void RemoveRebalance(IStepChangeRebalance rebalance)
    Parameters
    Type Name Description
    IStepChangeRebalance rebalance

    SetLock(IBaseEntity, bool)

    Sets the locked status IBaseEntity

    Declaration
    public override void SetLock(IBaseEntity baseEntity, bool value)
    Parameters
    Type Name Description
    IBaseEntity baseEntity
    bool value
    Overrides
    BaseTransactionProcessor.SetLock(IBaseEntity, bool)

    UpdateCalculatedProperties(ITransactionalEntity)

    Updates calculated properties on the entity (and presumably sub affected entities) such as financial date

    Declaration
    protected override Task UpdateCalculatedProperties(ITransactionalEntity tranEntity)
    Parameters
    Type Name Description
    ITransactionalEntity tranEntity
    Returns
    Type Description
    Task
    Overrides
    BaseTransactionProcessor.UpdateCalculatedProperties(ITransactionalEntity)

    Implements

    IStepChangeProcessor
    ILockable
    ITaskProcessor
    ICanBeRevertedTransactionProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    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.