Class FormulaFunctionsWithUpdater
Inheritance
FormulaFunctionsWithUpdater
Inherited Members
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>>, 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>>)
Assembly: LemonEdge.API.dll
public class FormulaFunctionsWithUpdater : FormulaFunctions, IFormulaFunctions
Constructors
FormulaFunctionsWithUpdater(IEntityRetriever, IReadOnlyCache, UserInfo, IFormulaFunctionsServiceContext)
Creates a new formula functions for helping with custom formulas as a context to operate against
Declaration
public FormulaFunctionsWithUpdater(IEntityRetriever retriever, IReadOnlyCache cache, UserInfo user, IFormulaFunctionsServiceContext services)
Parameters
Properties
Declaration
public IEntityUpdater MyData { get; }
Property Value
Methods
CreateFormulaContext(Type)
Declaration
protected virtual FormulaFunctions CreateFormulaContext(Type ofType)
Parameters
Type |
Name |
Description |
Type |
ofType |
|
Returns
Declaration
[FormulaFunction(Name = "CreateNewData", Type = "Data", Description = "Creates a new data context.", Params = "", ParamCount = 0, IsAsync = true)]
public Task<IEntityUpdater> CreateNewData()
Returns
Declaration
[FormulaFunction(Name = "CreateNewItem", Type = "Data", Description = "Creates and returns a new IBaseEntity of the specified typeName.", Params = "1. The name of the type to create.", ParamCount = 1, IsAsync = true)]
public Task<IBaseEntity> CreateNewItem(string typeName)
Parameters
Type |
Name |
Description |
string |
typeName |
|
Returns
Declaration
[FormulaFunction(Name = "CreateNewItem", Type = "Data", Description = "Creates and returns a new item of the specified type <T> (inheriting IBaseEntity).", Params = "", ParamCount = 0, IsAsync = true)]
public Task<T> CreateNewItem<T>() where T : IBaseEntity
Returns
Type Parameters
Declaration
[FormulaFunction(Name = "GetCustomParamValue", Type = "Main", Description = "Returns any custom parameter value for the specified key. Parameters are provided depending on the context.", Params = "1. The key of the custom parameter to return.", ParamCount = 1, IsAsync = false)]
public object GetCustomParamValue(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Declaration
[FormulaFunction(Name = "HasCustomParamValue", Type = "Main", Description = "Returns true if the given key exists as a custom parameter and can be returned from a GetCustomParamValue call.", Params = "1. The key of the custom parameter to check for.", ParamCount = 1, IsAsync = false)]
public bool HasCustomParamValue(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
Declaration
[FormulaFunction(Name = "HasCustomParamValueEqualTo", Type = "Main", Description = "Returns true if the given key exists as a custom parameter and has the specified value.", Params = "1. The key of the custom parameter to check for.\r\n2. The value to check for", ParamCount = 2, IsAsync = false)]
public bool HasCustomParamValueEqualTo(string key, object value)
Parameters
Returns
Declaration
[FormulaFunction(Name = "RunCodeSnippet", Type = "Main", Description = "Runs the specified code snippet returning its result, with the specified parameters.", Params = "1. name of the code snippet to run.\r\n2. Parameters for the code snippet of the format \"@paramName\", \"Value\"", ParamCount = 3, IsAsync = true)]
public Task<object> RunCodeSnippet(string codeSnippetName, params string[] parameters)
Parameters
Type |
Name |
Description |
string |
codeSnippetName |
|
string[] |
parameters |
|
Returns
Declaration
public void SetCustomParameters(Dictionary<string, object> parameters)
Parameters
Implements
Extension Methods