コード例 #1
0
        private bool ChangesAssignedExpression(Expression currentExpression, Expression assignedValue, Expression assignmentRecipient)
        {
            if (currentExpression as MethodInvocationExpression != null)
            {
                V_1 = currentExpression as MethodInvocationExpression;
                if (assignedValue.get_ExpressionType().get_IsByReference() && V_1.get_MethodExpression().get_Target() != null)
                {
                    V_2 = V_1.get_MethodExpression().get_Target();
                    if (V_2.Equals(assignmentRecipient))
                    {
                        return(false);
                    }
                    if (V_2 as UnaryExpression != null && (V_2 as UnaryExpression).get_Operator() == 8 && (V_2 as UnaryExpression).get_Operand().Equals(assignmentRecipient))
                    {
                        return(false);
                    }
                }
                return(true);
            }
            if (currentExpression as BinaryExpression == null)
            {
                return(false);
            }
            V_0 = currentExpression as BinaryExpression;
            if (V_0.get_Left().Equals(assignedValue))
            {
                return(true);
            }
            if (assignedValue as ArrayIndexerExpression != null)
            {
                V_3 = assignedValue as ArrayIndexerExpression;
                if (V_0.get_Left().Equals(V_3.get_Target()))
                {
                    return(true);
                }
                V_4 = V_3.get_Indices().GetEnumerator();
                try
                {
                    while (V_4.MoveNext())
                    {
                        V_5 = V_4.get_Current();
                        if (!V_0.get_Left().Equals(V_5))
                        {
                            continue;
                        }
                        V_6 = true;
                        goto Label1;
                    }
                    goto Label0;
                }
                finally
                {
                    if (V_4 != null)
                    {
                        V_4.Dispose();
                    }
                }
Label1:
                return(V_6);
            }
Label0:
            if (assignedValue as UnaryExpression != null)
            {
                return(this.ChangesAssignedExpression(currentExpression, (assignedValue as UnaryExpression).get_Operand(), assignmentRecipient));
            }
            if (assignedValue as ExplicitCastExpression != null)
            {
                return(this.ChangesAssignedExpression(currentExpression, (assignedValue as ExplicitCastExpression).get_Expression(), assignmentRecipient));
            }
            if (assignedValue as CanCastExpression == null)
            {
                return(false);
            }
            return(this.ChangesAssignedExpression(currentExpression, (assignedValue as CanCastExpression).get_Expression(), assignmentRecipient));
        }