/// <summary>
        /// Initializes a new instance of the AssignmentExpression class.
        /// </summary>
        /// <param name="proxy">Proxy object for the expression.</param>
        /// <param name="type">The type of operation being performed.</param>
        /// <param name="leftHandSide">The left hand side of the expression.</param>
        /// <param name="rightHandSide">The right hand side of the expression.</param>
        internal AssignmentExpression(
            CodeUnitProxy proxy,
            AssignmentExpressionType type,
            Expression leftHandSide,
            Expression rightHandSide)
            : base(proxy, (int)type)
        {
            Param.AssertNotNull(proxy, "proxy");
            Param.Ignore(type);
            Param.AssertNotNull(leftHandSide, "leftHandSide");
            Param.AssertNotNull(rightHandSide, "rightHandSide");

            CsLanguageService.Debug.Assert(System.Enum.IsDefined(typeof(AssignmentExpressionType), this.AssignmentExpressionType), "The type is invalid.");

            this.leftHandSide.Value = leftHandSide;
            this.rightHandSide.Value = rightHandSide;
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the AssignmentExpression class.
        /// </summary>
        /// <param name="proxy">Proxy object for the expression.</param>
        /// <param name="type">The type of operation being performed.</param>
        /// <param name="leftHandSide">The left hand side of the expression.</param>
        /// <param name="rightHandSide">The right hand side of the expression.</param>
        internal AssignmentExpression(
            CodeUnitProxy proxy,
            AssignmentExpressionType type,
            Expression leftHandSide,
            Expression rightHandSide)
            : base(proxy, (int)type)
        {
            Param.AssertNotNull(proxy, "proxy");
            Param.Ignore(type);
            Param.AssertNotNull(leftHandSide, "leftHandSide");
            Param.AssertNotNull(rightHandSide, "rightHandSide");

            CsLanguageService.Debug.Assert(System.Enum.IsDefined(typeof(AssignmentExpressionType), this.AssignmentExpressionType), "The type is invalid.");

            this.leftHandSide.Value  = leftHandSide;
            this.rightHandSide.Value = rightHandSide;
        }