public ExpressionEvaluator(CustomActionDispatcher dispatcher, int index, string expression, ExpectedValueType expectedValueType) { _dispatcher = dispatcher; _index = index; _expectedValueType = expectedValueType; Expression = expression; }
IExpressionEvaluator ICustomActionContext.RegisterValueExpression(string expression, ExpectedValueType expectedValueType) { if (expression is null) { throw new ArgumentNullException(nameof(expression)); } Infra.NotNull(_executor, Resources.Exception_RegistrationShouldNoOccurAfterInitialization); _values ??= ImmutableArray.CreateBuilder <IValueExpression>(); var expressionEvaluator = new ExpressionEvaluator(this, _values.Count, expression, expectedValueType); _values.Add(expressionEvaluator); return(expressionEvaluator); }