1 using System.Text.RegularExpressions;
5 class StackTraceMetadata
7 static Regex regex = new Regex (@"\[(?<Id>.+)\] (?<Value>.+)");
9 public readonly string Id;
10 public readonly string Value;
11 public readonly string Line;
13 private StackTraceMetadata (string line, string id, string val)
20 public static bool TryParse (string line, out StackTraceMetadata metadata)
24 var match = regex.Match (line);
28 string id = match.Groups ["Id"].Value;
29 string val = match.Groups ["Value"].Value;
31 metadata = new StackTraceMetadata (line, id, val);