Example #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));
        }
Example #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));
        }