protected override void CacheMetadata(CodeActivityMetadata metadata) { BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right); if (operationFunction == null) { if (!BinaryExpressionHelper.TryGenerateLinqDelegate(ExpressionType.And, out operationFunction, out var validationError)) { metadata.AddValidationError(validationError); } } }
protected override void CacheMetadata(CodeActivityMetadata metadata) { BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right); if (this.checkedOperation) { EnsureOperationFunction(metadata, ref checkedOperationFunction, ExpressionType.AddChecked); } else { EnsureOperationFunction(metadata, ref uncheckedOperationFunction, ExpressionType.Add); } }
private void EnsureOperationFunction(CodeActivityMetadata metadata, ref Func <TLeft, TRight, TResult> operationFunction, ExpressionType operatorType) { if (operationFunction == null) { if (!BinaryExpressionHelper.TryGenerateLinqDelegate( operatorType, out operationFunction, out ValidationError validationError)) { metadata.AddValidationError(validationError); } } }
protected override void CacheMetadata(CodeActivityMetadata metadata) { ValidationError error; BinaryExpressionHelper.OnGetArguments <TLeft, TRight>(metadata, this.Left, this.Right); if ((LessThanOrEqual <TLeft, TRight, TResult> .operationFunction == null) && !BinaryExpressionHelper.TryGenerateLinqDelegate <TLeft, TRight, TResult>(ExpressionType.LessThanOrEqual, out LessThanOrEqual <TLeft, TRight, TResult> .operationFunction, out error)) { metadata.AddValidationError(error); } }