Search Results for

    Show / Hide Table of Contents

    Class BlendTransactionContext

    The custom context for evaluating formulas against that are configured in the BlendingTransaction settings ( FormulaForValue)

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

    Inheritance
    object
    StandardFunctions
    FormulaFunctions
    FormulaFunctionsWithUpdater
    FormulaFunctionsWithContext<IBlendTransaction>
    BlendTransactionContext
    Implements
    IFormulaFunctionsWithContext<IBlendTransaction>
    IFormulaFunctionsWithContext
    IFormulaFunctions
    Inherited Members
    FormulaFunctionsWithContext<IBlendTransaction>.TestEvents()
    FormulaFunctionsWithContext<IBlendTransaction>.ItemAs<T1>()
    FormulaFunctionsWithContext<IBlendTransaction>.SetExtendedPropertyValue(IBaseEntity, string, string, object)
    FormulaFunctionsWithContext<IBlendTransaction>.SetBusy(string)
    FormulaFunctionsWithContext<IBlendTransaction>.StopBusy()
    FormulaFunctionsWithContext<IBlendTransaction>.CreateFormulaContext(Type)
    FormulaFunctionsWithContext<IBlendTransaction>.GetValue(string)
    FormulaFunctionsWithContext<IBlendTransaction>.GetValue<T2>(string)
    FormulaFunctionsWithContext<IBlendTransaction>.GetAnswerTotal(string)
    FormulaFunctionsWithContext<IBlendTransaction>.GetContextType(EntityDescriptor)
    FormulaFunctionsWithContext<IBlendTransaction>.MyItem
    FormulaFunctionsWithContext<IBlendTransaction>.Item
    FormulaFunctionsWithContext<IBlendTransaction>.PropertyChangedItem
    FormulaFunctionsWithContext<IBlendTransaction>.PropertyChangedName
    FormulaFunctionsWithContext<IBlendTransaction>.PropertyChangedAlias
    FormulaFunctionsWithContext<IBlendTransaction>.ChangedItemType
    FormulaFunctionsWithUpdater.SetCustomParameters(Dictionary<string, object>)
    FormulaFunctionsWithUpdater.CreateNewData()
    FormulaFunctionsWithUpdater.CreateNewItem(string)
    FormulaFunctionsWithUpdater.CreateNewItem<T>()
    FormulaFunctionsWithUpdater.GetCustomParamValue(string)
    FormulaFunctionsWithUpdater.HasCustomParamValue(string)
    FormulaFunctionsWithUpdater.HasCustomParamValueEqualTo(string, object)
    FormulaFunctionsWithUpdater.RunCodeSnippet(string, params string[])
    FormulaFunctionsWithUpdater.MyData
    FormulaFunctions.ShareThisQueryCacheWithTarget(IFormulaFunctions)
    FormulaFunctions.SetQueryRunnerHelper(Func<IEntityUpdater, ISQLWrapperInterpretor, Dictionary<string, string>, QueryableExecuter<ISQLWrapperResult>, Task<DataRow[]>>)
    FormulaFunctions.GetItemPropertyValue(object, string)
    FormulaFunctions.GetTaskID(string)
    FormulaFunctions.GetTaskParameter(string)
    FormulaFunctions.SetObjectValue(object, string, object)
    FormulaFunctions.GetObjectValue(object, string)
    FormulaFunctions.GetExtendedPropertyValue(IBaseEntity, string, string)
    FormulaFunctions.GetExtendedPropertyItem(IBaseEntity, string)
    FormulaFunctions.GetExtendedObject(IBaseEntity, string, bool)
    FormulaFunctions.GetEntityTypeID(string)
    FormulaFunctions.Evaluate<T>(string, bool)
    FormulaFunctions.IsValid<T>(string)
    FormulaFunctions.IsValid<T>(string, Type)
    FormulaFunctions.GetContextItemType(object)
    FormulaFunctions.GetItemFromDataSourceID(string, string)
    FormulaFunctions.GetItemFromDataSourceID(string, string, string)
    FormulaFunctions.GetItem(string, Guid)
    FormulaFunctions.GetItemAs<T>(Guid)
    FormulaFunctions.GetItems(string, QueryableFilter)
    FormulaFunctions.GetFirstOrDefaultItem(string, QueryableFilter)
    FormulaFunctions.GetItems(string, string, SQLOperator, object)
    FormulaFunctions.GetFirstOrDefaultItem(string, string, SQLOperator, object)
    FormulaFunctions.GetItems<T>(QueryableFilter)
    FormulaFunctions.GetFirstOrDefaultItem<T>(QueryableFilter)
    FormulaFunctions.GetItems<T>(string, SQLOperator, object)
    FormulaFunctions.GetFirstOrDefaultItem<T>(string, SQLOperator, object)
    FormulaFunctions.GetEnumValue(object)
    FormulaFunctions.GetEnumCode(object)
    FormulaFunctions.XIRR(string, string, string, params string[])
    FormulaFunctions.XIRR(string, string, string, (string, object)[], params string[])
    FormulaFunctions.TWR(string, string, string, string, params string[])
    FormulaFunctions.TWRRow(string, string, string, string, params string[])
    FormulaFunctions.RunQuery(string, string, params string[])
    FormulaFunctions.HasQueryResult(string, params string[])
    FormulaFunctions.GetQueryResult(ISQLWrapperResult, string)
    FormulaFunctions.GetQueryResult(DataRow, string)
    FormulaFunctions.GetQueryResult(string, string, ISQLWrapperResult)
    FormulaFunctions.GetQueryResult(string, string, DataRow)
    FormulaFunctions.GetQueryResult(string, string, ISQLWrapperResult[], string, object)
    FormulaFunctions.RunQueryResult(string, params string[])
    FormulaFunctions.RunDRQueryResult(string, params string[])
    FormulaFunctions.LogInfo(string, params object[])
    FormulaFunctions.LogError(Exception, string, params object[])
    FormulaFunctions.GetQueryCount(string, string, string)
    FormulaFunctions.GetQueryItems(string, string, string, string)
    FormulaFunctions.GetDRQueryItems(string, string, string, string)
    FormulaFunctions.Data
    FormulaFunctions.Cache
    FormulaFunctions.Services
    FormulaFunctions.User
    StandardFunctions.FormatAsString(object)
    StandardFunctions.Null()
    StandardFunctions.IsNull(object)
    StandardFunctions.Not(bool)
    StandardFunctions.Or(bool, bool)
    StandardFunctions.And(bool, bool)
    StandardFunctions.Sin(double)
    StandardFunctions.Cos(double)
    StandardFunctions.Now()
    StandardFunctions.Today()
    StandardFunctions.TodayString()
    StandardFunctions.EndOfMonth(DateTime)
    StandardFunctions.BeginningOfMonth(DateTime)
    StandardFunctions.BeginningOfWeek(DateTime)
    StandardFunctions.EndOfYear(DateTime)
    StandardFunctions.EndOfDay(DateTime)
    StandardFunctions.Floor(decimal)
    StandardFunctions.Ceiling(decimal)
    StandardFunctions.BeginningOfYear(DateTime)
    StandardFunctions.BeginningOfDay(DateTime)
    StandardFunctions.Random(int, int)
    StandardFunctions.Trim(string)
    StandardFunctions.TrimStart(string, char[])
    StandardFunctions.TrimEnd(string, char[])
    StandardFunctions.PadLeft(string, int, char)
    StandardFunctions.PadRight(string, int, char)
    StandardFunctions.Mod(double, double)
    StandardFunctions.If(bool, object, object)
    StandardFunctions.IsIn(object, object)
    StandardFunctions.IsIn(object, object, object)
    StandardFunctions.IsIn(object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object, object, object)
    StandardFunctions.IsIn(object, object, object, object, object, object, object, object, object, object, object)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.SelectCase(object, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>, Func<Task<object>>)
    StandardFunctions.Format(object, string)
    StandardFunctions.Lower(string)
    StandardFunctions.Upper(string)
    StandardFunctions.WCase(string)
    StandardFunctions.Date(int, int, int)
    StandardFunctions.Year(DateTime)
    StandardFunctions.Month(DateTime)
    StandardFunctions.Day(DateTime)
    StandardFunctions.WeekDay(DateTime)
    StandardFunctions.Replace(string, string, string)
    StandardFunctions.Substr(string, int, int)
    StandardFunctions.Len(string)
    StandardFunctions.Abs(double)
    StandardFunctions.Int(object)
    StandardFunctions.Trunc(double, int)
    StandardFunctions.Dec(object)
    StandardFunctions.Round(object)
    StandardFunctions.IsBlank(string)
    StandardFunctions.Round(object, int)
    StandardFunctions.Min(double, double, double, double, double)
    StandardFunctions.Max(double, double, double, double, double)
    StandardFunctions.Chr(int)
    StandardFunctions.ChCR()
    StandardFunctions.ChLF()
    StandardFunctions.ChCRLF()
    StandardFunctions.Money(object)
    StandardFunctions.Contains(string, string)
    StandardFunctions.FormatDate(DateTime, string)
    StandardFunctions.Sqrt(double)
    StandardFunctions.Power(double, double)
    StandardFunctions.ValString(object)
    StandardFunctions.ValBool(object)
    StandardFunctions.ValDate(object)
    StandardFunctions.ValDateTimeOffset(object)
    StandardFunctions.ValDecimal(object)
    StandardFunctions.ValLong(object)
    StandardFunctions.ValID(object)
    StandardFunctions.DateAdd(DateTime, decimal, decimal, decimal)
    StandardFunctions.DateAdd(DateTimeOffset, decimal, decimal, decimal)
    StandardFunctions.DateAddWorkDays(DateTime, decimal)
    StandardFunctions.DateAdd(DateTime, DateTime)
    StandardFunctions.DayDifference(DateTime, DateTime)
    StandardFunctions.DayDifferenceWorkDays(DateTime, DateTime)
    StandardFunctions.HourDifference(DateTime, DateTime)
    StandardFunctions.MinuteDifference(DateTime, DateTime)
    StandardFunctions.YearDifference(DateTime, DateTime)
    StandardFunctions.NullDate()
    StandardFunctions.NullDateTimeOffset()
    StandardFunctions.TempValue1
    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 BlendTransactionContext : FormulaFunctionsWithContext<IBlendTransaction>, IFormulaFunctionsWithContext<IBlendTransaction>, IFormulaFunctionsWithContext, IFormulaFunctions

    Constructors

    BlendTransactionContext(IEntityRetriever, IReadOnlyCache, UserInfo, BlendTransactionProcessorExtender, IFormulaFunctionsServiceContext)

    Creates a new blending transaction context for evaluating formulas against blending transaction configuration

    Declaration
    public BlendTransactionContext(IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user, BlendTransactionProcessorExtender extender, IFormulaFunctionsServiceContext services)
    Parameters
    Type Name Description
    IEntityRetriever retriever

    A context for retrieving data from the system with

    IReadOnlyCache cache

    A local current cache

    UserInfo user

    The currently logged in user

    BlendTransactionProcessorExtender extender

    The type of blending transaction process algorithm being used

    IFormulaFunctionsServiceContext services

    The services demanded from the IServiceProvider for the use in formulas

    Properties

    EffectiveDate

    The effective date the algorithm is currently running to

    Declaration
    public DateTimeOffset EffectiveDate { get; }
    Property Value
    Type Description
    DateTimeOffset

    Extender

    The type of blending transaction process algorithm being used

    Declaration
    public BlendTransactionProcessorExtender Extender { get; }
    Property Value
    Type Description
    BlendTransactionProcessorExtender

    FinancialDate

    The financial date the algorithm is currently running to

    Declaration
    public DateTimeOffset FinancialDate { get; }
    Property Value
    Type Description
    DateTimeOffset

    InstrumentID

    An optional argument for the current instrument id the algorithm is running against

    Declaration
    public Guid? InstrumentID { get; set; }
    Property Value
    Type Description
    Guid?

    StartDate

    The optional start date for this run of the algorithm

    Declaration
    public DateTimeOffset? StartDate { get; }
    Property Value
    Type Description
    DateTimeOffset?

    Methods

    GetValues(string, Guid?)

    A function for returning the collection of results for the specified value and optional current instrument

    Declaration
    [FormulaFunction(Name = "GetValues", Type = "BlendedTransaction", Description = "Returns A list of aggregated transaction values according to the setup in the API.Entities.IBlendingTran", Params = "1. The aggregated values to return specified from the API.Entities.IBlendingTranInstrumentValue.Name, or ISQLWrapper result.\r\n2. An optional instrument to only return the aggregated values for", ParamCount = 2, IsAsync = true)]
    public Task<IEnumerable<ITransactionAggregateResult>> GetValues(string valueName, Guid? instrumentID)
    Parameters
    Type Name Description
    string valueName

    The aggregated values to return specified from the Name, or ISQLWrapper result

    Guid? instrumentID

    An optional instrument to only return the aggregated values for

    Returns
    Type Description
    Task<IEnumerable<ITransactionAggregateResult>>

    A list of aggregated transaction values according to the setup in the IBlendingTransaction

    Init(IBlendTransactionInstrumentSet, DateTimeOffset?, DateTimeOffset, DateTimeOffset)

    Initializes the context with all the current states for evaluation against a current blended transaction formula

    Declaration
    public void Init(IBlendTransactionInstrumentSet instrumentSet, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
    Parameters
    Type Name Description
    IBlendTransactionInstrumentSet instrumentSet

    The instrument set blended transaction setup this is being evaluated against

    DateTimeOffset? startDate

    The optional start date for this run of the algorithm

    DateTimeOffset effectiveDate

    The effective date the algorithm is currently running to

    DateTimeOffset financialDate

    The financial date the algorithm is currently running to

    Init(SQLWrapperInterpretor, ISQLWrapperResult, DateTimeOffset?, DateTimeOffset, DateTimeOffset)

    Initializes the context with all the current states for evaluation against a current blended transaction formula

    Declaration
    public void Init(SQLWrapperInterpretor sqlWrapper, ISQLWrapperResult result, DateTimeOffset? startDate, DateTimeOffset effectiveDate, DateTimeOffset financialDate)
    Parameters
    Type Name Description
    SQLWrapperInterpretor sqlWrapper

    The currently executing source sql wrapper

    ISQLWrapperResult result

    The current result row for creating a transaction

    DateTimeOffset? startDate
    DateTimeOffset effectiveDate
    DateTimeOffset financialDate

    ReturnSQLWrapperResult(string)

    Returns the result of the specified column name for the executed sql wrapper of this blended transaction

    Declaration
    [FormulaFunction(Name = "ReturnSQLWrapperResult", Type = "BlendedTransaction", Description = "Returns the result of the specified column name for the executed sql wrapper of this blended transaction", Params = "1. The name of the column to return the value of.", ParamCount = 1, IsAsync = false)]
    public object ReturnSQLWrapperResult(string columnName)
    Parameters
    Type Name Description
    string columnName

    The name of the column to return the value of

    Returns
    Type Description
    object

    The result of the specified column name for the executed sql wrapper of this blended transaction

    Implements

    IFormulaFunctionsWithContext<T>
    IFormulaFunctionsWithContext
    IFormulaFunctions

    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

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