Пример #1
0
 public StackTraceUnobfuscationResult Unfuscate(string stacktrace, Version target = null)
 {
     var lines = stacktrace.Split('\n').Select(l => l.Trim()).Where(l => !string.IsNullOrEmpty(l));
     List<StackFrameUnobfuscationResult> frames = new List<StackFrameUnobfuscationResult>();
     foreach (var line in lines)
     {
         var sig = Signature.ParseStackTraceLine(line);
         frames.Add(new StackFrameUnobfuscationResult(sig, mappingDb.Get(sig).OrderByDescending(r => VersionUtils.NumEqual(r.VersionNumber, target))));
     }
     return new StackTraceUnobfuscationResult(frames);
 }