Ejemplo n.º 1
0
        public TSelf ArrayElement(int index)
        {
            this.instructions.Append(InstructionBlock.CreateCode(this.instructions, null, index));
            this.instructions.Emit(OpCodes.Ldelem_Ref);

            return(this as TSelf);
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
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));
        }
Ejemplo n.º 4
0
 protected void StoreElementInternal(BuilderType arrayType, object element, LocalVariable index)
 {
     InstructionBlock.CreateCodeForVariableDefinition(this.instructions, BuilderTypes.Int32, index);
     this.instructions.Append(InstructionBlock.CreateCode(this.instructions, arrayType.ChildType, element));
     this.instructions.Emit(OpCodes.Stelem_Ref);
 }
Ejemplo n.º 5
0
 protected void StoreElementInternal(BuilderType arrayType, object element, int index)
 {
     this.instructions.Append(InstructionBlock.CreateCode(this.instructions, null, index));
     this.instructions.Append(InstructionBlock.CreateCode(this.instructions, arrayType.ChildType, element));
     this.instructions.Emit(OpCodes.Stelem_Ref);
 }