示例#1
0
        private static ExpressionNode CreateOverload(ContextNode context, ExpressionNode expression, InternalUnaryOperatorType op, MethodReference method)
        {
            var point = expression.SequencePoint;

            if (IsIncrementDecrement(op))
            {
                TypeUtils.VerifyAccessible(method, context.GetClass().TypeReference, point);
                return(new IncrementDecrementOperatorNode(op, expression, method));
            }
            else
            {
                return(MethodCallNode.Create(context, new MethodNode(method, null, context, point), expression.Enumerate(), point));
            }
        }