예제 #1
0
파일: And.cs 프로젝트: wforney/corewf
        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);
                }
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 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);
         }
     }
 }
예제 #4
0
        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);
            }
        }