public DsxsToolResults(string output) { this.FullOutput = output; foreach (string line in output.Split('\n')) { if (line.StartsWith(" (i) ")) { string[] tmp = Regex.Split(Regex.Split(line, "parameter")[1], "appears"); string param = tmp[0]; string technique = Regex.Split(tmp[1], "vulnerable")[1]; DsxsItem item = new DsxsItem(); item.Parameter = param; item.PossibleTechnique = technique; if (this.Items == null) { this.Items = new List <DsxsItem>(); } this.Items.Add(item); } } }
public DsxsToolResults(string output) { this.FullOutput = output; foreach (string line in output.Split('\n')) { if (line.StartsWith(" (i) ")) { string[] tmp = Regex.Split(Regex.Split(line, "parameter")[1], "appears"); string param = tmp[0]; string technique = Regex.Split (tmp[1], "vulnerable")[1]; DsxsItem item = new DsxsItem(); item.Parameter = param; item.PossibleTechnique = technique; if (this.Items == null) this.Items = new List<DsxsItem>(); this.Items.Add(item); } } }