예제 #1
0
 public FixedStatement(Telerik.JustDecompiler.Ast.Expressions.Expression expression, BlockStatement body)
 {
     base();
     this.set_Expression(expression);
     this.set_Body(body);
     return;
 }
예제 #2
0
 private void PrepareUsingBlock(BinaryExpression binaryExpression, TryStatement @try, ExpressionStatement expressionStatement)
 {
     this.expression = binaryExpression.Left;
     for (int i = 0; i < @try.Try.Statements.Count; i++)
     {
         this.blockStatement.AddStatement(@try.Try.Statements[i]);
     }
     if (expressionStatement != null)
     {
         VisitAssignExpression(expressionStatement);
     }
 }
예제 #3
0
            private void VisitAssignExpression(ExpressionStatement expressionStatement)
            {
                if (!(expressionStatement.Expression.CodeNodeType == CodeNodeType.BinaryExpression &&
                      (expressionStatement.Expression as BinaryExpression).IsAssignmentExpression))
                {
                    return;
                }

                BinaryExpression assingExpression = (BinaryExpression)expressionStatement.Expression;

                this.expression = assingExpression;
                VisitVariableReference(assingExpression);
            }
예제 #4
0
            private void FixExpression()
            {
                if (variableReference == null)
                {
                    return;
                }

                VariableFinder   finder           = new VariableFinder(this.variableReference);
                BinaryExpression assignExpression = this.expression as BinaryExpression;

                if (assignExpression.Right.IsReferenceExpression() && !finder.FindVariable(theTry.Try))
                {
                    List <Instruction> instructions = new List <Instruction>(assignExpression.Left.UnderlyingSameMethodInstructions);
                    instructions.AddRange(assignExpression.MappedInstructions);
                    this.expression = assignExpression.Right.CloneAndAttachInstructions(instructions);
                }
            }
예제 #5
0
 public LockStatement(Telerik.JustDecompiler.Ast.Expressions.Expression expression, BlockStatement body, IEnumerable <Instruction> finallyInstructions)
 {
     base();
     this.set_Expression(expression);
     this.body = body;
     this.mappedFinallyInstructions = new List <Instruction>();
     if (finallyInstructions != null)
     {
         this.mappedFinallyInstructions.AddRange(finallyInstructions);
         stackVariable12 = this.mappedFinallyInstructions;
         stackVariable13 = LockStatement.u003cu003ec.u003cu003e9__2_0;
         if (stackVariable13 == null)
         {
             dummyVar0       = stackVariable13;
             stackVariable13 = new Comparison <Instruction>(LockStatement.u003cu003ec.u003cu003e9.u003cu002ectoru003eb__2_0);
             LockStatement.u003cu003ec.u003cu003e9__2_0 = stackVariable13;
         }
         stackVariable12.Sort(stackVariable13);
     }
     return;
 }
 public ExpressionStatement(Telerik.JustDecompiler.Ast.Expressions.Expression expression)
 {
     base();
     this.set_Expression(expression);
     return;
 }
			private void VisitAssignExpression(ExpressionStatement expressionStatement)
			{
				if (!(expressionStatement.Expression.CodeNodeType == CodeNodeType.BinaryExpression &&
                      (expressionStatement.Expression as BinaryExpression).IsAssignmentExpression))
					return;

				BinaryExpression assingExpression = (BinaryExpression) expressionStatement.Expression;
                
				this.expression = assingExpression;
				VisitVariableReference(assingExpression);
			}
			private void PrepareUsingBlock(BinaryExpression binaryExpression, TryStatement @try, ExpressionStatement expressionStatement)
			{
                this.expression = binaryExpression.Left;
				for (int i = 0; i < @try.Try.Statements.Count; i++)
				{
					this.blockStatement.AddStatement(@try.Try.Statements[i]);
				}
				if (expressionStatement != null)
				{
					VisitAssignExpression(expressionStatement);
				}
			}
            private void FixExpression()
            {
                if (variableReference == null)
                {
                    return;
                }

                VariableFinder finder = new VariableFinder(this.variableReference);
                BinaryExpression assignExpression = this.expression as BinaryExpression;
                if (assignExpression.Right.IsReferenceExpression() && !finder.FindVariable(theTry.Try))
                {
                    List<Instruction> instructions = new List<Instruction>(assignExpression.Left.UnderlyingSameMethodInstructions);
                    instructions.AddRange(assignExpression.MappedInstructions);
                    this.expression = assignExpression.Right.CloneAndAttachInstructions(instructions);
                }
            }