Class FormulaFunctionsFactory
Implements
Inherited Members
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 |
Type Parameters
Name | Description |
---|---|
T |