/// <summary> /// Creates a DataTarget from a crash dump, specifying the dump reader to use. /// </summary> /// <param name="fileName">The crash dump's filename.</param> /// <param name="dumpReader">The type of dump reader to use.</param> /// <returns>A DataTarget instance.</returns> public static DataTarget LoadCrashDump(string fileName, CrashDumpReader dumpReader) { if (dumpReader == CrashDumpReader.DbgEng) { DbgEngDataReader reader = new DbgEngDataReader(fileName); return(CreateFromReader(reader, reader.DebuggerInterface)); } else { DumpDataReader reader = new DumpDataReader(fileName); return(CreateFromReader(reader, null)); } }
public async Task<bool> LoadDump(string fileName, CrashDumpReader readerType) { if (IsAttached) return true; DumpReader = readerType; if (readerType == CrashDumpReader.DbgEng) { return await _workerTask.ContinueWith(task => LoadDump(fileName)); } return await Task.Run(() => LoadDump(fileName)).ConfigureAwait(false); }
public async Task <bool> LoadDump(string fileName, CrashDumpReader readerType) { if (IsAttached) { return(true); } DumpReader = readerType; if (readerType == CrashDumpReader.DbgEng) { return(await _workerTask.ContinueWith(task => LoadDump(fileName))); } return(await Task.Run(() => LoadDump(fileName)).ConfigureAwait(false)); }
/// <summary> /// Creates a DataTarget from a crash dump, specifying the dump reader to use. /// </summary> /// <param name="fileName">The crash dump's filename.</param> /// <param name="dumpReader">The type of dump reader to use.</param> /// <returns>A DataTarget instance.</returns> public static DataTarget LoadCrashDump(string fileName, CrashDumpReader dumpReader) { if (dumpReader == CrashDumpReader.DbgEng) { DbgEngDataReader reader = new DbgEngDataReader(fileName); return CreateFromReader(reader, reader.DebuggerInterface); } else { DumpDataReader reader = new DumpDataReader(fileName); return CreateFromReader(reader, null); } }