Esempio n. 1
0
        public BooleanExpressionArgCoder Load(ParametersCodeBlock arg)
        {
            if (arg.IsAllParameters)
            {
                throw new NotSupportedException("This kind of parameter is not supported by Load.");
            }

            var argInfo = arg.GetTargetType(this.instructions.associatedMethod);

            this.instructions.Append(InstructionBlock.CreateCode(this, null, arg));
            return(new BooleanExpressionArgCoder(this, argInfo.Item1));
        }
Esempio n. 2
0
        public Coder SetValue(ParametersCodeBlock arg, object value)
        {
            if (arg.IsAllParameters)
            {
                throw new NotSupportedException("Setting value to all parameters at once is not supported");
            }

            var argInfo = arg.GetTargetType(this.instructions.associatedMethod);

            this.instructions.Append(InstructionBlock.CreateCode(this, argInfo.Item1, value));
            this.instructions.Emit(OpCodes.Starg, argInfo.Item3);
            return(new Coder(this));
        }
Esempio n. 3
0
 public BooleanExpressionFieldCoder And(ParametersCodeBlock arg)
 {
     this.And(this.builderType, arg);
     return(this);
 }
Esempio n. 4
0
 public BooleanExpressionResultCoder OrOr(ParametersCodeBlock other) => this.OrOr(x => x.Load(other).Is(true));
Esempio n. 5
0
 public BooleanExpressionVariableCoder Or(ParametersCodeBlock arg)
 {
     this.Or(this.builderType, arg);
     return(this);
 }
Esempio n. 6
0
 public Coder SetValue(ParametersCodeBlock arg, Func <Coder, object> value) => this.SetValue(arg, value(this.NewCoder()));