Ejemplo n.º 1
0
        private bool CanBeLoop(ILogicalConstruct header, ILogicalConstruct latchingNode, ICollection <DFSTNode> nodesInLoop)
        {
            if (header == null || latchingNode == null)
            {
                return(false);
            }
            V_0 = this.GetConstructsCollection(nodesInLoop);
            V_1 = V_0.GetEnumerator();
            try
            {
                while (V_1.MoveNext())
                {
                    V_2 = V_1.get_Current();
                    if (this.CanBeInLoop(V_2, V_0, header))
                    {
                        continue;
                    }
                    V_3 = false;
                    goto Label1;
                }
                goto Label0;
            }
            finally
            {
                if (V_1 != null)
                {
                    V_1.Dispose();
                }
            }
Label1:
            return(V_3);

Label0:
            return(true);
        }
Ejemplo n.º 2
0
 private bool Match(StatementCollection statements)
 {
     this.statements         = statements;
     this.yieldDeclaringType = this.GetGeneratedType();
     if (this.yieldDeclaringType == null)
     {
         return(false);
     }
     V_0 = this.GetStatements();
     if (V_0 == null || this.yieldData == null)
     {
         return(false);
     }
     if (statements.get_Count() > 2)
     {
         this.SetParameterMappings();
         V_1 = this.GetEnumeratorStatements();
         if (V_1 != null)
         {
             this.PostProcessMappings(V_1);
         }
     }
     this.newStatements = new StatementCollection();
     V_2 = V_0.GetEnumerator();
     try
     {
         while (V_2.MoveNext())
         {
             V_3 = V_2.get_Current();
             this.newStatements.Add(V_3);
         }
     }
     finally
     {
         if (V_2 != null)
         {
             V_2.Dispose();
         }
     }
     return(true);
 }
Ejemplo n.º 3
0
 internal void RemoveBlockAt(int index)
 {
     V_0 = this.get_Blocks()[index];
     V_1 = V_0.get_Last().get_Next();
     if (V_0.get_Predecessors().get_Count() > 0)
     {
         throw new Exception("The block to be removed cannot have predecessors");
     }
     V_2 = this.get_Blocks();
     this.set_Blocks(new InstructionBlock[(int)this.get_Blocks().Length - 1]);
     V_3 = 0;
     while (V_3 < (int)this.get_Blocks().Length)
     {
         if (V_3 >= index)
         {
             stackVariable29 = 1;
         }
         else
         {
             stackVariable29 = 0;
         }
         V_4 = stackVariable29;
         this.get_Blocks()[V_3] = V_2[V_3 + V_4];
         this.get_Blocks()[V_3].set_Index(V_3);
         dummyVar0 = this.get_Blocks()[V_3].get_Predecessors().Remove(V_0);
         if ((object)this.get_Blocks()[V_3].get_First().get_Previous() == (object)V_0.get_Last())
         {
             this.get_Blocks()[V_3].get_First().set_Previous(V_0.get_First().get_Previous());
         }
         if ((object)this.get_Blocks()[V_3].get_Last().get_Next() == (object)V_0.get_First())
         {
             this.get_Blocks()[V_3].get_Last().set_Next(V_0.get_Last().get_Next());
         }
         V_3 = V_3 + 1;
     }
     dummyVar1 = this.get_InstructionToBlockMapping().Remove(V_0.get_First().get_Offset());
     dummyVar2 = this.get_SwitchBlocksInformation().Remove(V_0);
     V_0.set_Successors(new InstructionBlock[0]);
     V_5 = V_0.GetEnumerator();
     try
     {
         while (V_5.MoveNext())
         {
             V_6       = V_5.get_Current();
             dummyVar3 = this.get_OffsetToInstruction().Remove(V_6.get_Offset());
         }
     }
     finally
     {
         if (V_5 != null)
         {
             V_5.Dispose();
         }
     }
     V_7 = this.get_MethodBody().get_ExceptionHandlers().GetEnumerator();
     try
     {
         while (V_7.MoveNext())
         {
             V_8 = V_7.get_Current();
             if ((object)V_8.get_TryStart() == (object)V_0.get_First())
             {
                 V_8.set_TryStart(V_1);
             }
             if ((object)V_8.get_TryEnd() == (object)V_0.get_First())
             {
                 V_8.set_TryEnd(V_1);
             }
             if ((object)V_8.get_HandlerStart() == (object)V_0.get_First())
             {
                 V_8.set_HandlerStart(V_1);
             }
             if ((object)V_8.get_HandlerEnd() == (object)V_0.get_First())
             {
                 V_8.set_HandlerEnd(V_1);
             }
             if ((object)V_8.get_FilterStart() == (object)V_0.get_First())
             {
                 V_8.set_FilterStart(V_1);
             }
             if ((object)V_8.get_FilterEnd() != (object)V_0.get_First())
             {
                 continue;
             }
             V_8.set_FilterEnd(V_1);
         }
     }
     finally
     {
         V_7.Dispose();
     }
     V_0.set_Index(-1);
     return;
 }
Ejemplo n.º 4
0
        public MobileComponent(XElement element)
        {
            base();
            if (element != null)
            {
                stackVariable6 = element.Attribute(XName.op_Implicit("class"));
                if (stackVariable6 != null)
                {
                    stackVariable7 = stackVariable6.get_Value();
                }
                else
                {
                    dummyVar0      = stackVariable6;
                    stackVariable7 = null;
                }
                this.set_StyleName(stackVariable7);
                this.set_DataSource(new List <MobileComponent>());
                V_0 = element.Elements();
                if (!V_0.Any <XElement>())
                {
                    V_4 = element.get_Name().get_LocalName();
                    if (V_4 != null)
                    {
                        if (string.op_Equality(V_4, "img"))
                        {
                            this.set_ComponentType("Image");
                            this.set_DataType("image_url");
                            stackVariable57 = element.Attribute(XName.op_Implicit("src"));
                            if (stackVariable57 != null)
                            {
                                stackVariable67 = stackVariable57.get_Value().Replace("Model.", "@Model.").Replace("{{", "").Replace("}}", "");
                            }
                            else
                            {
                                dummyVar2       = stackVariable57;
                                stackVariable67 = null;
                            }
                            this.set_DataValue(stackVariable67);
                            return;
                        }
                        if (string.op_Equality(V_4, "br"))
                        {
                            goto Label0;
                        }
                    }
                    this.set_ComponentType("Text");
                    V_3 = element.get_Value().Trim();
                    if (!V_3.Contains("{{") || !V_3.Contains("}}"))
                    {
                        this.set_DataType("string");
                    }
                    else
                    {
                        this.set_DataType("object");
                    }
                    this.set_DataValue(element.get_Value().Trim().Replace("Model.", "@Model.").Replace("{{", "").Replace("}}", ""));
                }
                else
                {
                    if (element.Attribute(XName.op_Implicit("data")) == null)
                    {
                        this.set_ComponentType("View");
                        this.set_DataType("component");
                    }
                    else
                    {
                        this.set_ComponentType("View");
                        stackVariable100 = element.Attribute(XName.op_Implicit("data"));
                        if (stackVariable100 != null)
                        {
                            stackVariable110 = stackVariable100.get_Value().Replace("Model.", "@Model.").Replace("{{", "").Replace("}}", "");
                        }
                        else
                        {
                            dummyVar1        = stackVariable100;
                            stackVariable110 = null;
                        }
                        this.set_DataValue(stackVariable110);
                        this.set_DataType("object_array");
                    }
                    V_1 = V_0.GetEnumerator();
                    try
                    {
                        while (V_1.MoveNext())
                        {
                            V_2 = V_1.get_Current();
                            if (!XName.op_Inequality(V_2.get_Name(), XName.op_Implicit("br")))
                            {
                                continue;
                            }
                            this.get_DataSource().Add(new MobileComponent(V_2));
                        }
                    }
                    finally
                    {
                        if (V_1 != null)
                        {
                            V_1.Dispose();
                        }
                    }
                }
            }
Label0:
            return;
        }