示例#1
0
文件: Or.cs 项目: jimitndiaye/corewf
        protected override void CacheMetadata(CodeActivityMetadata metadata)
        {
            BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right);

            if (s_operationFunction == null)
            {
                ValidationError validationError;
                if (!BinaryExpressionHelper.TryGenerateLinqDelegate(ExpressionType.Or, out s_operationFunction, out validationError))
                {
                    metadata.AddValidationError(validationError);
                }
            }
        }
示例#2
0
        protected override void CacheMetadata(CodeActivityMetadata metadata)
        {
            BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right);

            if (_checkedOperation)
            {
                EnsureOperationFunction(metadata, ref s_checkedOperationFunction, ExpressionType.AddChecked);
            }
            else
            {
                EnsureOperationFunction(metadata, ref s_uncheckedOperationFunction, ExpressionType.Add);
            }
        }
示例#3
0
 private void EnsureOperationFunction(CodeActivityMetadata metadata,
                                      ref Func <TLeft, TRight, TResult> operationFunction,
                                      ExpressionType operatorType)
 {
     if (operationFunction == null)
     {
         ValidationError validationError;
         if (!BinaryExpressionHelper.TryGenerateLinqDelegate(
                 operatorType,
                 out operationFunction,
                 out validationError))
         {
             metadata.AddValidationError(validationError);
         }
     }
 }