Inheritance: BaseCodeTransformer
コード例 #1
0
 public TypedAssignExpression(Expression target, Expression expression)
     : base(target, expression)
 {
     this.ElementType = TypedTransformer.GetElementType(target);
     //TODO: do we need to check the assigning type? if so how can we do it without the actual type handles?
     //Helper.AreEqual(this.ElementType, TypedTransformer.GetElementType(expression), "'expression' argument must have the same element type as 'target' argument.");
 }
コード例 #2
0
        public TypedVariableReferenceExpression(Mono.Cecil.Cil.VariableReference variable)
            : base(variable)
        {
            var type = Type.GetType(variable.VariableType.FullName, true);

            this.ElementType = TypedTransformer.GetElementType(type);
        }
コード例 #3
0
 public TypedArgumentReferenceExpression(ParameterReference parameter)
     : base(parameter)
 {
     this.ElementType = TypedTransformer.GetElementType(parameter.ParameterType);
 }
コード例 #4
0
 public TypedUnaryExpression(UnaryOperator @operator, Expression operand)
     : base(@operator, operand)
 {
     this.ElementType = TypedTransformer.GetElementType(operand);
 }
コード例 #5
0
 public TypedBinaryExpression(BinaryOperator @operator, Expression left, Expression right)
     : base(@operator, left, right)
 {
     this.ElementType = TypedTransformer.GetElementType(left);
     Helper.AreEqual(this.ElementType, TypedTransformer.GetElementType(right), "left and right expressions do not have the same ElementType");
 }
コード例 #6
0
 public TypedLiteralExpression(object value)
     : base(value)
 {
     this.ElementType = TypedTransformer.GetElementType(value);
 }