Exemplo n.º 1
0
        public CodePath CreateCodePath(CodePathType type, int endOffset, int breakOffset)
        {
            var c = new CodePath(this, type, endOffset, breakOffset);

            ChildPaths.Add(c);
            return(c);
        }
Exemplo n.º 2
0
 public CodePath(CodePath parent, CodePathType type, int endOffset, int breakOffset)
 {
     Parent      = parent;
     Type        = type;
     EndOffset   = endOffset;
     BreakOffset = breakOffset;
     ChildPaths  = new List <CodePath>();
 }
Exemplo n.º 3
0
 public SwitchPath(CodePath parent, Dictionary <int, List <string> > cases, int endOffset, int breakOffset)
     : base(parent, CodePathType.Switch, endOffset, breakOffset)
 {
     Cases   = cases;
     Offsets = cases == null ? new List <int>() : cases.Keys.ToList();
     if (Program.RdrOpcodes)
     {
         Offsets.Sort();
     }
     Offsets.Add(breakOffset); // Ensure default is last offset
     foreach (var offset in Offsets)
     {
         EscapedCases[offset] = false;
     }
 }
Exemplo n.º 4
0
 public SwitchPath(CodePath parent, CodePathType type, int endOffset, int breakOffset)
     : base(parent, type, endOffset, breakOffset)
 {
     Offsets = new List <int>();
     Cases   = new Dictionary <int, List <string> >();
 }