Exemplo n.º 1
0
        protected override void CacheMetadata(CodeActivityMetadata metadata)
        {
            BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right);

            if (s_operationFunction == null)
            {
                ValidationError validationError;
                if (!BinaryExpressionHelper.TryGenerateLinqDelegate(ExpressionType.Equal, out s_operationFunction, out validationError))
                {
                    metadata.AddValidationError(validationError);
                }
            }
        }
Exemplo n.º 2
0
        protected override void CacheMetadata(CodeActivityMetadata metadata)
        {
            BinaryExpressionHelper.OnGetArguments(metadata, this.Left, this.Right);

            if (this.checkedOperation)
            {
                EnsureOperationFunction(metadata, ref checkedOperationFunction, ExpressionType.MultiplyChecked);
            }
            else
            {
                EnsureOperationFunction(metadata, ref uncheckedOperationFunction, ExpressionType.Multiply);
            }
        }
Exemplo n.º 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);
         }
     }
 }