Class ExpressionsService
- Namespace
- JJMasterData.Core.DataManager.Expressions
- Assembly
- JJMasterData.Core.dll
public class ExpressionsService
- Inheritance
-
ExpressionsService
- Inherited Members
-
Constructors
ExpressionsService(IEnumerable<IExpressionProvider>, ExpressionParser, IEncryptionService, ILogger<ExpressionsService>)
public ExpressionsService(IEnumerable<IExpressionProvider> expressionProviders, ExpressionParser expressionParser, IEncryptionService encryptionService, ILogger<ExpressionsService> logger)
Parameters
expressionProviders
IEnumerable<IExpressionProvider>
expressionParser
ExpressionParser
encryptionService
IEncryptionService
logger
ILogger<ExpressionsService>
Methods
public bool GetBoolValue(string? expression, FormStateData formStateData)
Parameters
expression
string
formStateData
FormStateData
Returns
- bool
public ValueTask<object?> GetDefaultValueAsync(FormElementFieldSelector fieldSelector, FormStateData formStateData)
Parameters
fieldSelector
FormElementFieldSelector
formStateData
FormStateData
Returns
- ValueTask<object>
public object? GetExpressionValue(string? expression, FormStateData formStateData)
Parameters
expression
string
formStateData
FormStateData
Returns
- object
public ValueTask<object?> GetTriggerValueAsync(FormElementFieldSelector fieldSelector, FormStateData formStateData)
Parameters
fieldSelector
FormElementFieldSelector
formStateData
FormStateData
Returns
- ValueTask<object>
public Dictionary<string, object?> ParseExpression(string expression, FormStateData formStateData)
Parameters
expression
string
formStateData
FormStateData
Returns
- Dictionary<string, object>
public string? ReplaceExpressionWithParsedValues(string? expression, FormStateData formStateData, bool encryptValues = false)
Parameters
expression
string
formStateData
FormStateData
encryptValues
bool
Returns
- string