Search Results for

    Show / Hide Table of Contents

    Class FormulaFunctionsFactory

    Inheritance
    object
    FormulaFunctionsFactory
    Implements
    IFormulaFunctionsFactory
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.API.Core.Formulas
    Assembly: LemonEdge.API.dll
    Syntax
    public class FormulaFunctionsFactory : IFormulaFunctionsFactory

    Constructors

    FormulaFunctionsFactory(IFactoryInjector)

    Declaration
    public FormulaFunctionsFactory(IFactoryInjector factoryInjector)
    Parameters
    Type Name Description
    IFactoryInjector factoryInjector

    Properties

    Instance

    Declaration
    public static IFormulaFunctionsFactory Instance { get; set; }
    Property Value
    Type Description
    IFormulaFunctionsFactory

    Methods

    Create(IEntityRetriever, IReadOnlyCache, UserInfo)

    Creates IFormulaFunctions.

    Declaration
    public IFormulaFunctions Create(IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user)
    Parameters
    Type Name Description
    IEntityRetriever retriever

    A context allowing formulas to load and query any data from LemonEdge

    IReadOnlyCache cache

    A local cache

    UserInfo user

    The current user executing the formula

    Returns
    Type Description
    IFormulaFunctions

    CreateWithContext(IEntityRetriever, IReadOnlyCache, UserInfo, object)

    Creates a new FormulaFunctionsWithContext<T> typed correctly to the type of item to be used as a context against this formula

    Declaration
    public IFormulaFunctionsWithContext CreateWithContext(IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user, object item)
    Parameters
    Type Name Description
    IEntityRetriever retriever

    A context allowing formulas to load and query any data from LemonEdge

    IReadOnlyCache cache

    A local cache

    UserInfo user

    The current user executing the formula

    object item

    The custom item to be used against the formula

    Returns
    Type Description
    IFormulaFunctionsWithContext

    A tuple containing the FormulaFunctionsWithContext and the precise type definition of the context item so it can be parsed and evaluated correctly against formula code referencing MyItem

    CreateWithContext(Type, IEntityRetriever, IReadOnlyCache, UserInfo, object, params object[])

    Provides the ability to specify a type that extends FormulaFunctionsWithContext<T> and creates a new context typed correctly to the type of item to be used as a context against this formula

    Declaration
    public IFormulaFunctionsWithContext CreateWithContext(Type formulaFunctionsType, IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user, object item, params object[] args)
    Parameters
    Type Name Description
    Type formulaFunctionsType

    The type that extends FormulaFunctionsWithContext<T>

    IEntityRetriever retriever

    A context allowing formulas to load and query any data from LemonEdge

    IReadOnlyCache cache

    A local cache

    UserInfo user

    The current user executing the formula

    object item

    The custom item to be used against the formula

    object[] args

    Additional runtime arguments for the creation of this extension of FormulaFunctionsWithContext<T>

    Returns
    Type Description
    IFormulaFunctionsWithContext

    A tuple containing the FormulaFunctionsWithContext and the precise type definition of the context item so it can be parsed and evaluated correctly against formula code referencing MyItem

    Create<T>(IEntityRetriever, IReadOnlyCache, UserInfo, params object[])

    Creates a new instance of any type that extends FormulaFunctions

    Declaration
    public T Create<T>(IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user, params object[] args) where T : class, IFormulaFunctions
    Parameters
    Type Name Description
    IEntityRetriever retriever

    A context allowing formulas to load and query any data from LemonEdge

    IReadOnlyCache cache

    A local cache

    UserInfo user

    The current user executing the formula

    object[] args

    Additional runtime arguments needed for the type's constructor

    Returns
    Type Description
    T

    IFormulaFunctions

    Type Parameters
    Name Description
    T

    Implements

    IFormulaFunctionsFactory

    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.