Search Results for

    Show / Hide Table of Contents

    Interface IBlendTransactionProcessor

    The processor responsible for processing a blended transaction calculation

    See https://web.lemonedge.com/help/blend-transactions/ for more information

    Inherited Members
    IBaseDataSetProcessorWithDBSave.SaveProcessed
    IBaseDataSetProcessorWithDBSave.ProcessOnDBSave()
    IBaseDataSetProcessorWithDBSave.RollbackChanges()
    IBaseDataSetProcessorWithDBSave.Order
    IBaseDataSetProcessor.IgnoreEvents
    IBaseDataSetProcessor.IsChangedItemPartOfDataSet(IBaseEntity)
    IBaseDataSetProcessor.AddToDataSetToProcess(IBaseEntity, EntityOperation)
    IBaseDataSetProcessor.Loaded
    IBaseDataSetProcessor.Load()
    ITaskProcessor.Init(ITaskRunner, ServerTaskParameter)
    ITaskProcessor.ProcessTask(CancellationToken)
    IProcessor.Updater
    IProcessor.Cache
    IProcessor.User
    IProcessor.Reporter
    System.IDisposable.Dispose()
    ILockable.CanWrite
    ILockable.CanLock
    ILockable.Locked
    Namespace: LemonEdge.API.Processors.Transactional
    Assembly: API.dll
    Syntax
    public interface IBlendTransactionProcessor : IBaseDataSetProcessorWithDBSave, IBaseDataSetProcessor, ITaskProcessor, IProcessor, IDisposable, ILockable

    Properties

    BlendedTransactions

    A list of all the ITransaction transactions created automatically by this Blended Transaction

    Declaration
    ITransactionProcessor BlendedTransactions { get; }
    Property Value
    Type Description
    ITransactionProcessor

    BlendingTran

    The blending transaction holding the configuration and rules for how this blended transaction should be processed

    Declaration
    IBlendingTran BlendingTran { get; }
    Property Value
    Type Description
    IBlendingTran

    BlendingTranInstrumentValues

    The instrument values the BlendingTran configuration can use

    Declaration
    IEnumerable<IBlendingTranInstrumentValue> BlendingTranInstrumentValues { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IBlendingTranInstrumentValue>

    BlendingTranNewValueAggregates

    The aggregate values for new transaction values the BlendingTran configuration can use

    Declaration
    IEnumerable<IBlendingTranNewValueAggregate> BlendingTranNewValueAggregates { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IBlendingTranNewValueAggregate>

    BlendingTranNewValueAllocations

    The allocations to use for new transaction values the BlendingTran configuration can use

    Declaration
    IEnumerable<IBlendingTranNewValueAllocation> BlendingTranNewValueAllocations { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IBlendingTranNewValueAllocation>

    BlendingTranNewValues

    The new transaction values the BlendingTran configuration can use

    Declaration
    IEnumerable<IBlendingTranNewValue> BlendingTranNewValues { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IBlendingTranNewValue>

    BlendTransaction

    The blended transaction that is being processed by this processor

    Declaration
    IBlendTransaction BlendTransaction { get; }
    Property Value
    Type Description
    IBlendTransaction

    InstrumentSets

    The set of blended transaction instrument sets dictating what instruments/entities to create transactions against

    Declaration
    IEnumerable<IBlendTransactionInstrumentSet> InstrumentSets { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IBlendTransactionInstrumentSet>

    Methods

    GetBlendTransaction(IBlendingTranNewValue, IBlendTransactionInstrumentSet, TransactionsHelper, Nullable<Guid>, Nullable<Guid>, Nullable<Guid>, DateTimeOffset, Boolean)

    Retrieves, or creates, the transaction for the specified target values that the blended transaction should automatically be creating

    Declaration
    Task<ITransaction> GetBlendTransaction(IBlendingTranNewValue tranToCreate, IBlendTransactionInstrumentSet insSet, TransactionsHelper helper, Guid? forInstrumentID, Guid? forEntityID, Guid? forPathID, DateTimeOffset forEffectiveDate, bool forceNew)
    Parameters
    Type Name Description
    IBlendingTranNewValue tranToCreate

    The defined transaction to create

    IBlendTransactionInstrumentSet insSet

    The blended transaction target this transaction is being created for

    TransactionsHelper helper

    A transactions helper class for updating the transaction configuration

    System.Nullable<System.Guid> forInstrumentID

    An optional instrument this transaction is being created against. If null must supply a forPathID and forEntityID

    System.Nullable<System.Guid> forEntityID

    An optional entity this transaction is being created against

    System.Nullable<System.Guid> forPathID

    An optional path this transaction is being created against

    System.DateTimeOffset forEffectiveDate

    The transaction date for this transaction. Typically the TransactionDate of the IBlendTransaction unless RepeatDatesEvery is being used

    System.Boolean forceNew
    Returns
    Type Description
    System.Threading.Tasks.Task<ITransaction>

    The transaction for the specified target values that the blended transaction should automatically be creating

    GetDatesForAlgorithmRun()

    Returns a list of dates that should be used for creating these transactions.

    Depends on the RepeatDatesEvery setting. If None then will just return the IBlendTransaction StartDate, TransactionDate and FinancialDate

    If a repetition is configured then it will create a list of dates incrementing from the startdate by the RepeatDatesEveryInterval and RepeatDatesEvery up to the IBlendTransaction TransactionDate
    Declaration
    IEnumerable<(DateTimeOffset? StartDate, DateTimeOffset EffectiveDate, DateTimeOffset FinancialDate)> GetDatesForAlgorithmRun()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.ValueTuple<System.Nullable<System.DateTimeOffset>, System.DateTimeOffset, System.DateTimeOffset>>

    A list of dates that should be used for creating these transactions.

    GetInstrumentsToCreateTransactionsAgainst(IBlendingTranNewValue, IBlendTransactionInstrumentSet, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset)

    Returns a class indicating how the specified blending transaction to create, should be created for the specified bleded transaction instrument source/targets and the specified dates

    Declaration
    Task<BlendTransactionAllocation> GetInstrumentsToCreateTransactionsAgainst(IBlendingTranNewValue transactionToCreate, IBlendTransactionInstrumentSet instrumentSet, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
    Parameters
    Type Name Description
    IBlendingTranNewValue transactionToCreate

    The configuration against the IBlendingTran indicating what type of transaction to create

    IBlendTransactionInstrumentSet instrumentSet

    The instrument set of source/targets for the transaction that are configured against thie IBlendTransaction

    System.Nullable<System.DateTimeOffset> startDate

    The optional start date to use for determining values that are applicable for this new transaction

    System.DateTimeOffset effectiveDate

    The effective date for the transaction, provided from Transaction date of IBlendTransaction, or incremented from it if RepeatDatesEvery is used

    System.DateTimeOffset financialDate

    The financial date for the transaction, provided from FinancialDate, or incremented from it if RepeatDatesEvery is used

    Returns
    Type Description
    System.Threading.Tasks.Task<BlendTransactionAllocation>

    A blend Transaction Allocation detailing how to create the transaction with a list of target allocations

    GetSourceTransaction(IBlendTransactionInstrumentSet)

    Returns the source transaction from the blended transaction instrument sets (SourceTransactionID) if one is setup

    Declaration
    Task<ITransaction> GetSourceTransaction(IBlendTransactionInstrumentSet instSet)
    Parameters
    Type Name Description
    IBlendTransactionInstrumentSet instSet

    The instrument set against the blended transaction to return the source transaction for

    Returns
    Type Description
    System.Threading.Tasks.Task<ITransaction>

    The source transaction from the blended transaction instrument sets (SourceTransactionID) if one is setup

    GetValueTotals(BlendTransactionAllocation, IBlendingTranNewValue, IBlendTransactionInstrumentSet, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset)

    Returns the collection of values that should be allocated to the new transaction by instrument

    Declaration
    Task<IEnumerable<BlendTransactionValueTotals>> GetValueTotals(BlendTransactionAllocation targets, IBlendingTranNewValue transactionToCreate, IBlendTransactionInstrumentSet instrumentSet, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
    Parameters
    Type Name Description
    BlendTransactionAllocation targets

    A list of the targets to create the transactions against including their allocation splits. Acquired from GetInstrumentsToCreateTransactionsAgainst(IBlendingTranNewValue, IBlendTransactionInstrumentSet, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset)

    IBlendingTranNewValue transactionToCreate

    The configured transaction to create from the IBlendingTranNewValue

    IBlendTransactionInstrumentSet instrumentSet

    The blended transaction instrument set that we are creating transaction for. Should be the same that GetInstrumentsToCreateTransactionsAgainst(IBlendingTranNewValue, IBlendTransactionInstrumentSet, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset) was called with

    System.Nullable<System.DateTimeOffset> startDate

    The optional start date to filter the transactions to aggregate by

    System.DateTimeOffset effectiveDate

    The transaction date transactions should be filtered up to

    System.DateTimeOffset financialDate

    The financial date transactions should be filtered up to

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<BlendTransactionValueTotals>>

    A collection of values that should be allocated to the new transaction by instrument

    GetValueTotals(Guid, IBlendingTranInstrumentValue, Boolean, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset)

    Returns the aggregate values for the specified ITransactionAggregator and ITransactionMatcher defined against the forValue.

    The system aggregates these values for the specified instruments and dates, and returns them optionally byInstrument

    Declaration
    Task<IEnumerable<ITransactionAggregateResult>> GetValueTotals(Guid instrumentSetID, IBlendingTranInstrumentValue forValue, bool byInstrument, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
    Parameters
    Type Name Description
    System.Guid instrumentSetID

    The set of instruments that all transactions should be aggregated against

    IBlendingTranInstrumentValue forValue

    The settings of ITransactionMatcher and ITransactionAggregator that define exactly what transactions and values (including gl values) to aggregate

    System.Boolean byInstrument

    Indicates the results should be broken down by the instrument the transactions are against

    System.Nullable<System.DateTimeOffset> startDate

    The optional start date to filter the transactions to aggregate by

    System.DateTimeOffset effectiveDate

    The transaction date transactions should be filtered up to

    System.DateTimeOffset financialDate

    The financial date transactions should be filtered up to

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITransactionAggregateResult>>

    A list of aggregate transaction totals according to the specified instruments, dates and transaction matcher/aggregators

    GetValueTotals(Guid, ITransactionTypeValue, Boolean, Nullable<DateTimeOffset>, DateTimeOffset, DateTimeOffset)

    Returns the aggregate values for the specified ITransactionTypeValue for the specified instruments and dates, and returns them optionally byInstrument

    Declaration
    Task<IEnumerable<ITransactionAggregateResult>> GetValueTotals(Guid instrumentSetID, ITransactionTypeValue forValue, bool byInstrument, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
    Parameters
    Type Name Description
    System.Guid instrumentSetID

    The set of instruments that all transactions should be aggregated against

    ITransactionTypeValue forValue

    The specific transaction value to aggregate

    System.Boolean byInstrument

    Indicates the results should be broken down by the instrument the transactions are against

    System.Nullable<System.DateTimeOffset> startDate

    The optional start date to filter the transactions to aggregate by

    System.DateTimeOffset effectiveDate

    The transaction date transactions should be filtered up to

    System.DateTimeOffset financialDate

    The financial date transactions should be filtered up to

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITransactionAggregateResult>>

    A list of aggregate transaction totals according to the specified instruments, dates and transaction type value

    LoadBlendingAlgorithm(Boolean)

    Loads the blending transaction algorithm definition for this processor

    Declaration
    Task LoadBlendingAlgorithm(bool force)
    Parameters
    Type Name Description
    System.Boolean force

    Indicates if the definition should be loaded even if it already has been (incase changes have been made to the defintion)

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    LoadLight()

    Loads the configuration for this processor, but not the transactions and everything to calculate the algorithm

    This is all that is needed to use the processor in the ui

    Declaration
    Task LoadLight()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    RegisterDeleteInstrumentSet(IBlendTransactionInstrumentSet)

    Removes a blended transaction instrument set, containing a set of source/target items for transactions to be created against, from this processor

    Declaration
    void RegisterDeleteInstrumentSet(IBlendTransactionInstrumentSet set)
    Parameters
    Type Name Description
    IBlendTransactionInstrumentSet set

    The blended transaction instrument set to remove from this processor and stop listening to any changes against it

    RegisterNewInstrumentSet(IBlendTransactionInstrumentSet)

    Registers a new blended transaction instrument set containing a set of source/target items for transactions to be created against.

    Declaration
    void RegisterNewInstrumentSet(IBlendTransactionInstrumentSet set)
    Parameters
    Type Name Description
    IBlendTransactionInstrumentSet set

    The blended transaction instrument set to register with this processor and listent for changes from

    Events

    OnBlendTransactionChanged

    The event notifying listeners that changes have been made to the processor

    Declaration
    event BlendTransactionProcessorEventHandler OnBlendTransactionChanged
    Event Type
    Type Description
    BlendTransactionProcessorEventHandler

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.