public CodePath CreateCodePath(CodePathType type, int endOffset, int breakOffset) { var c = new CodePath(this, type, endOffset, breakOffset); ChildPaths.Add(c); return(c); }
public CodePath(CodePath parent, CodePathType type, int endOffset, int breakOffset) { Parent = parent; Type = type; EndOffset = endOffset; BreakOffset = breakOffset; ChildPaths = new List <CodePath>(); }
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; } }
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> >(); }