Search Results for

    Show / Hide Table of Contents

    Class TransactionProcessor

    Inheritance
    object
    BaseTransactionProcessor
    TransactionProcessor
    Implements
    ICanBeRevertedTransactionProcessor
    ITransactionProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    IProcessor
    IDisposable
    ILockable
    IProcessorSupportsBulkLoad<ITransactionProcessor>
    Inherited Members
    BaseTransactionProcessor.RollbackChanges()
    BaseTransactionProcessor.GetAllItemsInTransactionProcessor(bool)
    BaseTransactionProcessor.TaskInit(IEntityUpdater, IReadOnlyCache, UserInfo, BusyProgressReporter)
    BaseTransactionProcessor.StatusValidate(IHeaderTransactionalEntity, IEntityUpdater, IReadOnlyCache, UserInfo, IEntityDescriptorFactory, bool, bool)
    BaseTransactionProcessor.ForceLoad()
    BaseTransactionProcessor.ExecuteFormula<T>(string, IBaseEntity)
    BaseTransactionProcessor.CustomUpdateCancelCorrectedItem(EntityDescriptor, ITransactionalEntity, ITransactionalEntity, bool)
    BaseTransactionProcessor.ProcessCancel(ITransactionalEntity, bool, BaseTransactionProcessor)
    BaseTransactionProcessor.ProcessCorrect(ITransactionalEntity, TransactionStatus, BaseTransactionProcessor)
    BaseTransactionProcessor.UpdateCommonProperties()
    BaseTransactionProcessor.UpdateCommonProperties(IHeaderTransactionalEntity, ITransactionalEntity)
    BaseTransactionProcessor.UpdateAllStatuses(IHeaderTransactionalEntity)
    BaseTransactionProcessor.Dispose(bool)
    BaseTransactionProcessor.DisposeUnManagedState()
    BaseTransactionProcessor.Dispose()
    BaseTransactionProcessor.Services
    BaseTransactionProcessor.FinancialDateCalculator
    BaseTransactionProcessor.SubProcessors
    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
    public class TransactionProcessor : BaseTransactionProcessor, ICanBeRevertedTransactionProcessor, ITransactionProcessor, IBaseDataSetProcessorWithDBSave, IBaseDataSetProcessor, IProcessor, IDisposable, ILockable, IProcessorSupportsBulkLoad<ITransactionProcessor>

    Constructors

    TransactionProcessor(IEntityUpdater, IReadOnlyCache, UserInfo, IServiceContext, IExchangeRateRetriever, IPathSplitIdProvider, ITransactionPathSplitUpdater, IGlPostingPathSplitUpdater)

    Declaration
    public TransactionProcessor(IEntityUpdater updater, IReadOnlyCache cache, UserInfo user, IServiceContext services, IExchangeRateRetriever exchangeRateRetriever, IPathSplitIdProvider pathSplitProvider, ITransactionPathSplitUpdater transactionPathSplitUpdater, IGlPostingPathSplitUpdater glPostingPathSplitUpdater)
    Parameters
    Type Name Description
    IEntityUpdater updater
    IReadOnlyCache cache
    UserInfo user
    IServiceContext services
    IExchangeRateRetriever exchangeRateRetriever
    IPathSplitIdProvider pathSplitProvider
    ITransactionPathSplitUpdater transactionPathSplitUpdater
    IGlPostingPathSplitUpdater glPostingPathSplitUpdater

    Properties

    DefaultRounding

    The default rounding level to use with a Rounder

    Declaration
    public RoundingLevel DefaultRounding { get; }
    Property Value
    Type Description
    RoundingLevel

    ExchangeRateRetriever

    A retriever for acquiring the valid exchange rate for a requested from/to currency and associated date

    Declaration
    public IExchangeRateRetriever ExchangeRateRetriever { get; }
    Property Value
    Type Description
    IExchangeRateRetriever

    GetAllTransactions

    Returns all transaction records (the root transaction, header transactions and sub-transactions) within this processor

    Declaration
    public IEnumerable<ITransaction> GetAllTransactions { get; }
    Property Value
    Type Description
    IEnumerable<ITransaction>

    HeaderTransactions

    An enumeration of all header transactions in this processor.

    Header transactions are all individually processed unless working together using a TransactionProcessorExtender

    Declaration
    public IEnumerable<ITransaction> HeaderTransactions { get; }
    Property Value
    Type Description
    IEnumerable<ITransaction>

    Helper

    A helper class for dealing with transaction operations and ensuring values are updated consistently

    Declaration
    public ITransactionsHelper Helper { get; }
    Property Value
    Type Description
    ITransactionsHelper

    InstrumentHelper

    Declaration
    public ITransactionInstrumentEntityHelper InstrumentHelper { get; }
    Property Value
    Type Description
    ITransactionInstrumentEntityHelper

    Links

    Declaration
    public List<ITransactionLink> Links { get; }
    Property Value
    Type Description
    List<ITransactionLink>

    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

    RootTransaction

    The parent root transaction this processor is responsible for calculating.

    All other header and sub transactions pointing to this root are part of the set and will be processed by this algorithm too

    Declaration
    public ITransaction RootTransaction { get; }
    Property Value
    Type Description
    ITransaction

    RootTransactionEntity

    The root transaction entity for this transaction processor

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

    RootTransactionID

    Declaration
    public Guid RootTransactionID { get; }
    Property Value
    Type Description
    Guid

    Methods

    AddCodeVaue(ITransaction, Guid)

    Adds the specified transaction type value to be recorded against the specified transaction (and all its sub-transactions) itself

    Declaration
    public void AddCodeVaue(ITransaction transaction, Guid tranTypeValueID)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction (and all associated sub-transactions) to add the specified transaction type value to

    Guid tranTypeValueID

    The transaction type value to add to the transaction

    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)

    CacheSetting(ITransaction)

    Declaration
    public Task CacheSetting(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    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)

    ConsolidateTransfers(ITransaction)

    If you have allocations within the transaction that has transfers within them, it will net them to a single allocation with the effect of the transfer. For example, an allocation of 50 + 50 to the same investor would result in a single allocation of 100.

    Declaration
    public Task ConsolidateTransfers(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    Task

    CreateGLPosting(ITransaction, ITransactionCodeGLEntry)

    Creates a gl posting record for the specified parent transaction and registers it

    Declaration
    public Task<IGLPosting> CreateGLPosting(ITransaction parent, ITransactionCodeGLEntry glEntry)
    Parameters
    Type Name Description
    ITransaction parent

    The transaction that is the parent of this gl posting

    ITransactionCodeGLEntry glEntry

    The optional transaction code gl entry this gl posting is being created for. Can be null if manually being created

    Returns
    Type Description
    Task<IGLPosting>

    A gl posting record for the specified parent transaction

    CreateGLPostingAllocated(IGLPosting)

    Creates a gl posting allocation record for the specified parent gl posting and registers it

    Declaration
    public Task<IGLPostingAllocated> CreateGLPostingAllocated(IGLPosting parent)
    Parameters
    Type Name Description
    IGLPosting parent

    The gl posting record that is a parent to this allocation

    Returns
    Type Description
    Task<IGLPostingAllocated>

    A gl posting allocation record for the specified parent gl posting

    CreateTransaction(ITransaction)

    Creates a sub-transaction where the ParentTransactionID is set to the specified parent and registers it

    Declaration
    public Task<ITransaction> CreateTransaction(ITransaction parent)
    Parameters
    Type Name Description
    ITransaction parent

    The header transaction that is the parent of this created transaction

    Returns
    Type Description
    Task<ITransaction>

    A sub-transaction where the ParentTransactionID is set to the specified parent

    CreateTransactionAllocated(ITransaction)

    Creates a transaction allocation record for the specified parent transaction and registers it

    Declaration
    public Task<ITransactionAllocated> CreateTransactionAllocated(ITransaction parent)
    Parameters
    Type Name Description
    ITransaction parent

    The transaction that is the parent of the created transaction allocation

    Returns
    Type Description
    Task<ITransactionAllocated>

    A transaction allocation record for the specified parent transaction

    DeleteGLPosting(IGLPosting, bool)

    Removes the specified gl posting from the processor, and stops listening to any changes against the record

    This cascades to all gl posting allocations

    Declaration
    public Task DeleteGLPosting(IGLPosting posting, bool updateLog)
    Parameters
    Type Name Description
    IGLPosting posting

    The gl posting to remove from the processor, and all associated gl posting allocations

    bool updateLog

    Indicates if the posting should also be removed from the IEntityUpdater context and marked for deletion. If not then it will update affected net amounts for other records, otherwise it assumes the caller will take care of it as it already marked the record for deletion too.

    Returns
    Type Description
    Task

    DeleteGLPostingAllocated(IGLPostingAllocated, bool)

    Removes the specified gl posting allocation from the processor, and stops listening to any changes against the record

    Declaration
    public Task DeleteGLPostingAllocated(IGLPostingAllocated allocated, bool updateLog)
    Parameters
    Type Name Description
    IGLPostingAllocated allocated

    The gl posting allocation to remove from the processor

    bool updateLog

    Indicates if the posting allocation should also be removed from the IEntityUpdater context and marked for deletion. If not then it will update affected net amounts for other records, otherwise it assumes the caller will take care of it as it already marked the record for deletion too.

    Returns
    Type Description
    Task

    DeleteTransaction(ITransaction, bool)

    Removes the specified transaction from the processor, and stops listening to any changes against the record

    This cascades to all sub-transactions, transaction allocations, gl postings, and gl posting allocations

    If this transaction is the root transaction, the processor will be empty if there are no other transactions, or it will promote the next header transaction to become root
    Declaration
    public Task DeleteTransaction(ITransaction transaction, bool updateLog)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction to remove from the processor, and all associated sub-transactions

    bool updateLog

    Indicates if the transaction should also be removed from the IEntityUpdater context and marked for deletion

    Returns
    Type Description
    Task

    DeleteTransactionAllocated(ITransactionAllocated, bool)

    Removes the specified transaction allocation from the processor, and stops listening to any changes against the record

    This cascades to all gl posting allocations

    Declaration
    public Task DeleteTransactionAllocated(ITransactionAllocated transactionAllocated, bool updateLog)
    Parameters
    Type Name Description
    ITransactionAllocated transactionAllocated
    bool updateLog

    Indicates if the transaction allocation should also be removed from the IEntityUpdater context and marked for deletion. If not then it will update affected net amounts for other records, otherwise it assumes the caller will take care of it as it already marked the record for deletion too.

    Returns
    Type Description
    Task

    DisposeManagedState()

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

    DoesGLValuesHaveSubAccount(ITransaction)

    Declaration
    public bool DoesGLValuesHaveSubAccount(ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction
    Returns
    Type Description
    bool

    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()

    GetAllTransactionValuesAllocated(ITransaction)

    Returns all allocated transaction values against the specified owningTransaction and all its sub-transactions (obtained from GetTransactionValues(ITransaction))

    Declaration
    public IEnumerable<ITransactionAllocated> GetAllTransactionValuesAllocated(ITransaction owningTransaction)
    Parameters
    Type Name Description
    ITransaction owningTransaction

    The owning header transaction to return all transaction allocations for (including those from any sub-transactions too)

    Returns
    Type Description
    IEnumerable<ITransactionAllocated>

    All allocated transaction values against the specified owningTransaction and all its sub-transactions (obtained from GetTransactionValues(ITransaction))

    GetAllocateToValues(ITransaction)

    Returns all the transaction allocation rules for creating a new transaction automatically to entities that are allocated to as part of a chain mapping

    Declaration
    public IEnumerable<(ITransactionCodeAllocateToTransaction, IEnumerable<ITransactionCodeAllocateToTransactionValue>)> GetAllocateToValues(ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction to retrieve all automatica transactions for

    Returns
    Type Description
    IEnumerable<(ITransactionCodeAllocateToTransaction, IEnumerable<ITransactionCodeAllocateToTransactionValue>)>

    All the transaction allocation rules for creating a new transaction automatically to entities that are allocated to as part of a chain mapping

    GetAllocatedEntityInOtherEntitySet(ITransaction, Guid)

    If the specified allocated entity exists as an entity in another fund, this returns the id of the entity in the other fund

    Declaration
    public Task<Guid?> GetAllocatedEntityInOtherEntitySet(ITransaction transaction, Guid allocatedEntityID)
    Parameters
    Type Name Description
    ITransaction transaction
    Guid allocatedEntityID
    Returns
    Type Description
    Task<Guid?>

    GetCode(ITransaction)

    Returns the actual transaction code for the specified owningTransaction

    Declaration
    public ITransactionCode GetCode(ITransaction owningTransaction)
    Parameters
    Type Name Description
    ITransaction owningTransaction

    The transaction to return the associated transaction code for its TransactionCodeID

    Returns
    Type Description
    ITransactionCode

    The actual transaction code for the specified owningTransaction

    GetCodeGLEntries(ITransaction)

    Returns the transaction code gl entry settings for the specified transaction

    This indicates which gl postings should automatically be created against the transaction

    Declaration
    public IEnumerable<ITransactionCodeGLEntry> GetCodeGLEntries(ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction to return the automatic gl entry settings for

    Returns
    Type Description
    IEnumerable<ITransactionCodeGLEntry>

    The transaction code gl entry settings for the specified transaction

    GetCurrencyMatches(ITransaction)

    Returns if currencies match

    Declaration
    public (bool LocalFunctional, bool localReporting) GetCurrencyMatches(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    (bool LocalFunctional, bool localReporting)

    GetDecimalPlaces(ITransaction)

    Returns the decimal places for each currency in the transaction

    Declaration
    public (short Local, short Functional, short Reporting) GetDecimalPlaces(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    (short Local, short Functional, short Reporting)

    GetEntity(Guid)

    Returns the specified entity, and the id of the entity set it belongs to for the specified transaction

    Declaration
    public Task<(IObjectEntity Entity, Guid EntitySetID)> GetEntity(Guid id)
    Parameters
    Type Name Description
    Guid id
    Returns
    Type Description
    Task<(IObjectEntity Entity, Guid EntitySetID)>

    The specified entity, and the id of the entity set it belongs to for the specified transaction

    GetEntitySet(Guid)

    Returns the entity set from the specified id

    Declaration
    public Task<IEntitySet> GetEntitySet(Guid id)
    Parameters
    Type Name Description
    Guid id

    ID of the required entity set

    Returns
    Type Description
    Task<IEntitySet>

    The entity set from the specified id

    GetEntry(ITransactionCodeValue, ITransactionTypeValue)

    Declaration
    public TransactionTypeValueEntry GetEntry(ITransactionCodeValue value, ITransactionTypeValue def)
    Parameters
    Type Name Description
    ITransactionCodeValue value
    ITransactionTypeValue def
    Returns
    Type Description
    TransactionTypeValueEntry

    GetFunctionalCurrency(ITransaction)

    Declaration
    public ICurrency GetFunctionalCurrency(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    ICurrency

    GetGLValues(ITransaction)

    Returns all gl posting records directly associated with the specified owningTransaction and its sub-transactions

    Declaration
    public IEnumerable<IGLPosting> GetGLValues(ITransaction owningTransaction)
    Parameters
    Type Name Description
    ITransaction owningTransaction

    The owning header transaction to return all gl postings for (including those from any sub-transactions too)

    Returns
    Type Description
    IEnumerable<IGLPosting>

    All gl posting records directly associated with the specified owningTransaction and its sub-transactions

    GetGLValuesAllocated(IGLPosting)

    Returns all allocated gl posting values directly against the specified owningPosting only.

    Declaration
    public IEnumerable<IGLPostingAllocated> GetGLValuesAllocated(IGLPosting owningPosting)
    Parameters
    Type Name Description
    IGLPosting owningPosting

    The gl posting to return all direct allocated gl postings for (those with GLPostingID set to this)

    Returns
    Type Description
    IEnumerable<IGLPostingAllocated>

    All allocated gl posting values directly against the specified owningPosting only.

    GetLocalCurrency(ITransaction)

    Declaration
    public ICurrency GetLocalCurrency(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    ICurrency

    GetPath(ITransaction)

    Declaration
    public Guid? GetPath(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    Guid?

    GetPath(Guid)

    Returns the loaded path from the specified pathID

    Declaration
    public IEnumerable<IPathInfo> GetPath(Guid pathID)
    Parameters
    Type Name Description
    Guid pathID

    The id of the path to return

    Returns
    Type Description
    IEnumerable<IPathInfo>

    The loaded path from the specified pathID

    GetPivotedTransactionValues(ITransaction)

    Returns a list of bound pivotted helper classes for editing the transaction values in a pivotted fashion

    For ui use only

    Declaration
    public IEnumerable<PivotedTransactionValue> GetPivotedTransactionValues(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    IEnumerable<PivotedTransactionValue>

    GetReportingCurrency(ITransaction)

    Declaration
    public ICurrency GetReportingCurrency(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    ICurrency

    GetRounder(ITransaction)

    A calculator for rounding a given number to a specified level

    Declaration
    public IRounder GetRounder(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran

    The transaction the rounder is required for

    Returns
    Type Description
    IRounder

    A calculator for rounding a given number to a specified level

    GetTransaction(Guid)

    Returns the transaction within this processor identified by the specified globally unique id

    Declaration
    public ITransaction GetTransaction(Guid id)
    Parameters
    Type Name Description
    Guid id

    The id of a transaction within this processor

    Returns
    Type Description
    ITransaction

    The transaction within this processor identified by the specified globally unique id

    GetTransactionCodeValueTypes(ITransaction)

    Returns all the values being stored against the specified transaction (and thus its sub-transactions too)

    Transactions are configured to stored different values against them according to the transaction code.

    This returns a list of transaction code settings and associated transaction values
    Declaration
    public IEnumerable<(ITransactionCodeValue CodeValue, ITransactionTypeValue ValueDef)> GetTransactionCodeValueTypes(ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction to return the values being stored against it

    Returns
    Type Description
    IEnumerable<(ITransactionCodeValue CodeValue, ITransactionTypeValue ValueDef)>

    All the values being stored against the specified transaction (and thus its sub-transactions too)

    GetTransactionSet(ITransaction)

    Returns all transactions in a set that the specified transaction is a member of

    A set defines a header transaction and sub-transactions that have their ParentTransactionID set to the header transaction

    Providing the header transaction or a sub-transaction will return the header and all sub-transactions
    Declaration
    public IEnumerable<ITransaction> GetTransactionSet(ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction

    A transaction in the set (either header or sub-transaction)

    Returns
    Type Description
    IEnumerable<ITransaction>

    All transactions in a set that the specified transaction is a member of

    GetTransactionSetting(ITransaction)

    Retrieves a loaded associated transaction setting entity against the specified transaction

    Transaction settings are linked to through SettingsID and implement IHasTransactionSetting

    Declaration
    public IBaseEntity GetTransactionSetting(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran

    The transaction to retrieve its associated settings entity from

    Returns
    Type Description
    IBaseEntity

    The already loaded transaction setting entity for this transaction

    GetTransactionValues(ITransaction)

    Returns all sub-transactions that have the specified owningTransaction as their ParentTransactionID along with the owning transaction itself

    Declaration
    public IEnumerable<ITransaction> GetTransactionValues(ITransaction owningTransaction)
    Parameters
    Type Name Description
    ITransaction owningTransaction

    The owning header transaction to return all sub-transactions of

    Returns
    Type Description
    IEnumerable<ITransaction>

    All sub-transactions that have the specified owningTransaction as their ParentTransactionID along with the owning transaction itself

    GetTransactionValuesAllocated(ITransaction)

    Returns all allocated transaction values against the specified owningTransaction only.

    Declaration
    public IEnumerable<ITransactionAllocated> GetTransactionValuesAllocated(ITransaction owningTransaction)
    Parameters
    Type Name Description
    ITransaction owningTransaction

    The transaction to return all direct allocated transactions for (those with ParentTransactionID set to this)

    Returns
    Type Description
    IEnumerable<ITransactionAllocated>

    All allocated transaction values against the specified owningTransaction only.

    HasLoaderAttached()

    Declaration
    public bool HasLoaderAttached()
    Returns
    Type Description
    bool

    HasThisLoaderAttached(BulkProcessorLoader<ITransactionProcessor>)

    Declaration
    public bool HasThisLoaderAttached(BulkProcessorLoader<ITransactionProcessor> loader)
    Parameters
    Type Name Description
    BulkProcessorLoader<ITransactionProcessor> loader
    Returns
    Type Description
    bool

    IncludeInBulk()

    Declaration
    public bool IncludeInBulk()
    Returns
    Type Description
    bool

    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()

    Load(bool)

    Declaration
    public Task Load(bool loadAllPathInfo)
    Parameters
    Type Name Description
    bool loadAllPathInfo
    Returns
    Type Description
    Task

    LoadAllPathInfos(bool)

    Declaration
    public Task LoadAllPathInfos(bool forcePaths)
    Parameters
    Type Name Description
    bool forcePaths
    Returns
    Type Description
    Task

    LoadExtenders(ITransaction, bool)

    Declaration
    public Task LoadExtenders(ITransaction tran, bool forceReload)
    Parameters
    Type Name Description
    ITransaction tran
    bool forceReload
    Returns
    Type Description
    Task

    LoadPathInfo(ITransaction, bool)

    Loads the allocation path information for the specified transaction according to the configuration of the associated transaction code

    If dynamically allocating values out, the system will allocate the values across the path and create appropriate transaction allocation records for the breakdown (along with sub transactions and allocations if needed along the path)

    Declaration
    public Task LoadPathInfo(ITransaction tran, bool force)
    Parameters
    Type Name Description
    ITransaction tran

    The transaction to load the path allocation information for

    bool force

    Indicates the path should be reloaded even if it is already cached as dependant values may have changed such as the date

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    LoadTransferInfo()

    Declaration
    public Task LoadTransferInfo()
    Returns
    Type Description
    Task

    MoveItemSequence(ITransaction, ITransaction)

    Declaration
    public void MoveItemSequence(ITransaction fromItem, ITransaction toItem)
    Parameters
    Type Name Description
    ITransaction fromItem
    ITransaction toItem

    OnChanged(TransactionProcessorEventArgs)

    Raises the OnTransactionChanged event with the specified arguments

    Declaration
    public void OnChanged(TransactionProcessorEventArgs args)
    Parameters
    Type Name Description
    TransactionProcessorEventArgs args

    The arguments for the OnTransactionChanged event

    OnLoadTransactionCodeInfo(ITransaction, bool)

    Loads all the associated transaction code configuration for the specified transaction

    Declaration
    public Task OnLoadTransactionCodeInfo(ITransaction transaction, bool changed)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction to load its associated transaction code configuration for, including any TransactionProcessorExtender required too

    bool changed

    Indicates the code has been changed, and thus all current values need to be reset to 0

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    ProcessExtender(ITransaction, IBaseEntity, string, bool, object[])

    Executes all extenders (TransactionProcessorExtender) configured against the ITransactionCode for the specified tran

    Each extender is passed the name of the property that has changed so it can determine what, if any, processes need to be run

    Declaration
    public Task ProcessExtender(ITransaction tran, IBaseEntity changedItem, string propertyChangedName, bool ignoredByProcessor = false, object[] contextArgs = null)
    Parameters
    Type Name Description
    ITransaction tran

    The transaction that has a property changed and needs all extenders to respond to it

    IBaseEntity changedItem
    string propertyChangedName

    The name of the property that has changed

    bool ignoredByProcessor
    object[] contextArgs
    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    ProcessOnDBSave()

    Handles the status of the root transaction item, and all other transactional items in the processor

    Also automatically handles cancelling, cancel/corrects, and automatically creating tasks to process the calculation on the service instead of in the save

    Declaration
    public override Task ProcessOnDBSave()
    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Overrides
    BaseTransactionProcessor.ProcessOnDBSave()

    ProcessTransaction()

    Calculates the actual transaction work to be done during a IEntityUpdater.SaveChanges(System.Threading.CancellationToken, bool, System.Data.Common.DbTransaction) , called during ProcessOnDBSave()

    Any created/updated/deleted items in this process should also be returned in subsequent calls to GetAllItemsInTransaction

    Does nothing in base class, this should be overridden by any implementing processor ensuring the process is run during any save
    Declaration
    public override Task ProcessTransaction()
    Returns
    Type Description
    Task
    Overrides
    BaseTransactionProcessor.ProcessTransaction()

    ProcessTransaction(ITransaction)

    Processes a transaction - runs the rules of the transaction code.

    Declaration
    public Task ProcessTransaction(ITransaction tran)
    Parameters
    Type Name Description
    ITransaction tran
    Returns
    Type Description
    Task

    RegisterGLPosting(IGLPosting)

    Declaration
    public void RegisterGLPosting(IGLPosting posting)
    Parameters
    Type Name Description
    IGLPosting posting

    RegisterNewGLPosting(IGLPosting, ITransaction, ITransactionCodeGLEntry)

    Registers a newly created Gl Posting record with the processor so it is correctly loaded, and so the processor can react to changes in the record's values

    Declaration
    public Task RegisterNewGLPosting(IGLPosting posting, ITransaction owningTransaction, ITransactionCodeGLEntry glEntry)
    Parameters
    Type Name Description
    IGLPosting posting

    The gl posting to register with this processor

    ITransaction owningTransaction
    ITransactionCodeGLEntry glEntry
    Returns
    Type Description
    Task

    RegisterNewGLPostingAllocated(IGLPostingAllocated)

    Registers a newly created Gl Posting Allocation record with the processor so it is correctly loaded, and so the processor can react to changes in the record's values

    Declaration
    public Task RegisterNewGLPostingAllocated(IGLPostingAllocated alloc)
    Parameters
    Type Name Description
    IGLPostingAllocated alloc

    The gl posting allocation to register with this processor

    Returns
    Type Description
    Task

    RegisterNewTransactionAllocated(ITransactionAllocated)

    Registers a newly created Transaction Allocation record with the processor so it is correctly loaded, and so the processor can react to changes in the record's values

    Declaration
    public Task RegisterNewTransactionAllocated(ITransactionAllocated alloc)
    Parameters
    Type Name Description
    ITransactionAllocated alloc

    The transaction allocation to register with this processor

    Returns
    Type Description
    Task

    RegisterTransaction(ITransaction)

    Registers a newly created Transaction record with the processor so it is correctly loaded, and so the processor can react to changes in the record's values

    Declaration
    public Task RegisterTransaction(ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction to register with this processor

    Returns
    Type Description
    Task

    Reload()

    Reloads the transaction.

    Declaration
    public Task Reload()
    Returns
    Type Description
    Task

    RemoveCodeValue(ITransaction, Guid)

    Removes the specified transaction type value from the transaction. Possible if the transaction code allows manual alteration of the values stored against a transaction

    Declaration
    public Task RemoveCodeValue(ITransaction transaction, Guid tranTypeValueID)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction (and all associated sub-transactions) to remove the specified transaction type value from

    Guid tranTypeValueID

    The transaction type value to remove from the transaction

    Returns
    Type Description
    Task

    A task indicating the completion of the operaion

    ResetTransactionCodeValueAmounts(ITransaction)

    Declaration
    public void ResetTransactionCodeValueAmounts(ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction

    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)

    SetStepChangeDate(DateTimeOffset?)

    Declaration
    public void SetStepChangeDate(DateTimeOffset? stepChangeDate)
    Parameters
    Type Name Description
    DateTimeOffset? stepChangeDate

    ThreadSafeAttach(BulkProcessorLoader<ITransactionProcessor>)

    Declaration
    public void ThreadSafeAttach(BulkProcessorLoader<ITransactionProcessor> loader)
    Parameters
    Type Name Description
    BulkProcessorLoader<ITransactionProcessor> loader

    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)

    UpdateFinacialDate(ITransactionalEntity)

    Updates the financial date to the correct one based on the transaction date, for the specified transactional entity.

    By default this only works with ITransaction and IGLPosting

    Can override to update financial dates on other items in the processor
    Declaration
    public override Task UpdateFinacialDate(ITransactionalEntity tranEntity)
    Parameters
    Type Name Description
    ITransactionalEntity tranEntity
    Returns
    Type Description
    Task
    Overrides
    BaseTransactionProcessor.UpdateFinacialDate(ITransactionalEntity)

    UpdateRounders(ITransaction, bool)

    Updates the stored rounders in the processors for the specified transaction and all its sub-transactions

    Declaration
    public Task UpdateRounders(ITransaction transaction, bool updateLevel)
    Parameters
    Type Name Description
    ITransaction transaction

    The transaction (and its sub-transactions) to update all the rounders for

    bool updateLevel
    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    UpdateTransactionPathSplit(ITransaction, IAllocationPath)

    Declaration
    public Task UpdateTransactionPathSplit(ITransaction transaction, IAllocationPath path)
    Parameters
    Type Name Description
    ITransaction transaction
    IAllocationPath path
    Returns
    Type Description
    Task

    Validate()

    Performs custom validation to validate this processor and all transactional entities within it

    Throws an error for any validation failure

    Declaration
    public override Task Validate()
    Returns
    Type Description
    Task

    A task indicating the completion of this operation

    Overrides
    BaseTransactionProcessor.Validate()

    Events

    OnTransactionChanged

    An event indicating the processor has changed the specified value against records within the processor

    Declaration
    public event TransactionProcessorEventHandler OnTransactionChanged
    Event Type
    Type Description
    TransactionProcessorEventHandler

    Implements

    ICanBeRevertedTransactionProcessor
    ITransactionProcessor
    IBaseDataSetProcessorWithDBSave
    IBaseDataSetProcessor
    IProcessor
    IDisposable
    ILockable
    IProcessorSupportsBulkLoad<T>

    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.