public static ClrDumpInfo Load(string dumpPath) { ClrDumpInfo clrDumpInfo = null; string clrDumpInfoPath = GetClrDumpInfoPath(dumpPath); try { if (File.Exists(clrDumpInfoPath)) { using (var reader = new StreamReader(clrDumpInfoPath)) { var processInfoObj = XML.Deserialize(reader); clrDumpInfo = processInfoObj as ClrDumpInfo; clrDumpInfo.Init(dumpPath); } } } finally { if (clrDumpInfo == null) { clrDumpInfo = new ClrDumpInfo(dumpPath); clrDumpInfo.ProcessInfo = new ProcessInfo(); clrDumpInfo.Init(); clrDumpInfo.Save(); } } return clrDumpInfo; }
public static ClrDumpInfo Load(string dumpPath) { ClrDumpInfo clrDumpInfo = null; string clrDumpInfoPath = GetClrDumpInfoPath(dumpPath); try { if (File.Exists(clrDumpInfoPath)) { using (var reader = new StreamReader(clrDumpInfoPath)) { var processInfoObj = XML.Deserialize(reader); clrDumpInfo = processInfoObj as ClrDumpInfo; clrDumpInfo.Init(dumpPath); } } } finally { if (clrDumpInfo == null) { clrDumpInfo = new ClrDumpInfo(dumpPath); clrDumpInfo.ProcessInfo = new ProcessInfo(); clrDumpInfo.Init(); clrDumpInfo.Save(); } } return(clrDumpInfo); }