Exemple #1
0
 private static Expression[] GetArgArray(DynamicMetaObject[] args)
 {
     return(new NewArrayExpression[]
     {
         Expression.NewArrayInit(typeof(object), DynamicProxyMetaObject <T> .GetArgs(args))
     });
 }
Exemple #2
0
 private static Expression[] GetArgArray(DynamicMetaObject[] args, DynamicMetaObject value)
 {
     return(new Expression[]
     {
         Expression.NewArrayInit(typeof(object), DynamicProxyMetaObject <T> .GetArgs(args)),
         Expression.Convert(value.Expression, typeof(object))
     });
 }
Exemple #3
0
 public override DynamicMetaObject BindBinaryOperation(BinaryOperationBinder binder, DynamicMetaObject arg)
 {
     if (!this.IsOverridden("TryBinaryOperation"))
     {
         return(base.BindBinaryOperation(binder, arg));
     }
     return(this.CallMethodWithResult("TryBinaryOperation", binder, DynamicProxyMetaObject <T> .GetArgs(new DynamicMetaObject[] { arg }), (DynamicMetaObject e) => binder.FallbackBinaryOperation(this, arg, e), null));
 }
Exemple #4
0
 public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value)
 {
     if (!this.IsOverridden("TrySetMember"))
     {
         return(base.BindSetMember(binder, value));
     }
     return(this.CallMethodReturnLast("TrySetMember", binder, DynamicProxyMetaObject <T> .GetArgs(new DynamicMetaObject[] { value }), (DynamicMetaObject e) => binder.FallbackSetMember(this, value, e)));
 }
Exemple #5
0
 private static System.Linq.Expressions.Expression[] GetArgArray(DynamicMetaObject[] args, DynamicMetaObject value)
 {
     System.Linq.Expressions.Expression   expression;
     System.Linq.Expressions.Expression   expression1     = value.Expression;
     System.Linq.Expressions.Expression[] expressionArray = new System.Linq.Expressions.Expression[] { System.Linq.Expressions.Expression.NewArrayInit(typeof(object), DynamicProxyMetaObject <T> .GetArgs(args)), null };
     if (expression1.Type.IsValueType())
     {
         expression = System.Linq.Expressions.Expression.Convert(expression1, typeof(object));
     }
     else
     {
         expression = expression1;
     }
     expressionArray[1] = expression;
     return(expressionArray);
 }