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
    System.Object
    StandardFunctions
    FormulaFunctions
    FormulaFunctionsWithContext
    FormulaFunctionsWithContext<IBlendTransaction>
    BlendTransactionContext
    Implements
    IFormulaFunctionsWithContextItem
    IFormulaFunctions
    Inherited Members
    FormulaFunctionsWithContext<IBlendTransaction>.MyItem
    FormulaFunctionsWithContext.Item
    FormulaFunctionsWithContext.ItemAs<T>()
    FormulaFunctionsWithContext.GetValue(String)
    FormulaFunctionsWithContext.GetValue<T>(String)
    FormulaFunctionsWithContext.Create(IEntityRetriever, IReadOnlyCache, UserInfo, Object)
    FormulaFunctionsWithContext.GetContextType(EntityDescriptor)
    FormulaFunctions.Data
    FormulaFunctions.Cache
    FormulaFunctions.User
    FormulaFunctions.GetContextItemType(Object)
    FormulaFunctions.GetItemPropertyValue(Object, String)
    FormulaFunctions.GetItemFromDataSourceID(String, String)
    FormulaFunctions.GetItemFromDataSourceID(String, String, String)
    FormulaFunctions.GetItem(String, Guid)
    FormulaFunctions.RunQuery(String, String, String[])
    FormulaFunctions.GetQueryItems(String, String, String, String)
    StandardFunctions.FormatAsString(Object)
    StandardFunctions.Null()
    StandardFunctions.IsNull(Object)
    StandardFunctions.Not(Boolean)
    StandardFunctions.Or(Boolean, Boolean)
    StandardFunctions.And(Boolean, Boolean)
    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(Int32, Int32)
    StandardFunctions.Trim(String)
    StandardFunctions.TrimStart(String, Char[])
    StandardFunctions.TrimEnd(String, Char[])
    StandardFunctions.PadLeft(String, Int32, Char)
    StandardFunctions.PadRight(String, Int32, Char)
    StandardFunctions.Mod(Double, Double)
    StandardFunctions.If(Boolean, 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(Int32, Int32, Int32)
    StandardFunctions.Year(DateTime)
    StandardFunctions.Month(DateTime)
    StandardFunctions.Day(DateTime)
    StandardFunctions.WeekDay(DateTime)
    StandardFunctions.Replace(String, String, String)
    StandardFunctions.Substr(String, Int32, Int32)
    StandardFunctions.Len(String)
    StandardFunctions.Abs(Double)
    StandardFunctions.Int(Object)
    StandardFunctions.Trunc(Double, Int32)
    StandardFunctions.Dec(Object)
    StandardFunctions.Round(Object)
    StandardFunctions.IsBlank(String)
    StandardFunctions.Round(Object, Int32)
    StandardFunctions.Min(Double, Double, Double, Double, Double)
    StandardFunctions.Max(Double, Double, Double, Double, Double)
    StandardFunctions.Chr(Int32)
    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.ValDecimal(Object)
    StandardFunctions.ValLong(Object)
    StandardFunctions.ValID(Object)
    StandardFunctions.DateAdd(DateTime, 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()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.API.Processors.Transactional
    Assembly: API.dll
    Syntax
    public class BlendTransactionContext : FormulaFunctionsWithContext<IBlendTransaction>, IFormulaFunctionsWithContextItem, IFormulaFunctions

    Constructors

    BlendTransactionContext(IEntityRetriever, IReadOnlyCache, UserInfo, BlendTransactionProcessorExtender)

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

    Declaration
    public BlendTransactionContext(IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user, BlendTransactionProcessorExtender extender)
    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

    Properties

    EffectiveDate

    The effective date the algorithm is currently running to

    Declaration
    public DateTimeOffset EffectiveDate { get; }
    Property Value
    Type Description
    System.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
    System.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
    System.Nullable<System.Guid>

    StartDate

    The optional start date for this run of the algorithm

    Declaration
    public DateTimeOffset? StartDate { get; }
    Property Value
    Type Description
    System.Nullable<System.DateTimeOffset>

    Methods

    GetValues(String, Nullable<Guid>)

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

    Declaration
    public Task<IEnumerable<ITransactionAggregateResult>> GetValues(string valueName, Guid? instrumentID)
    Parameters
    Type Name Description
    System.String valueName

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

    System.Nullable<System.Guid> instrumentID

    An optional instrument to only return the aggregated values for

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

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

    Init(SQLWrapperInterpretor, ISQLWrapperResult, Nullable<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

    System.Nullable<System.DateTimeOffset> startDate
    System.DateTimeOffset effectiveDate
    System.DateTimeOffset financialDate

    Init(IBlendTransactionInstrumentSet, Nullable<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

    System.Nullable<System.DateTimeOffset> startDate

    The optional start date for this run of the algorithm

    System.DateTimeOffset effectiveDate

    The effective date the algorithm is currently running to

    System.DateTimeOffset financialDate

    The financial date the algorithm is currently running to

    ReturnSQLWrapperResult(String)

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

    Declaration
    public object ReturnSQLWrapperResult(string columnName)
    Parameters
    Type Name Description
    System.String columnName

    The name of the column to return the value of

    Returns
    Type Description
    System.Object

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

    Implements

    IFormulaFunctionsWithContextItem
    IFormulaFunctions

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)

    See Also

    IBlendTransactionProcessor
    In This Article
    Back to top © LemonEdge Technology. All rights reserved.