Interface IFormulaFunctionsFactory
Namespace: LemonEdge.API.Core.Formulas
Assembly: LemonEdge.API.dll
Syntax
public interface IFormulaFunctionsFactory
Methods
Create(IEntityRetriever, IReadOnlyCache, UserInfo)
Creates IFormulaFunctions.
Declaration
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
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
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
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 |