/// <summary> /// Enumerate all the native threads in the dump /// </summary> /// <returns>an enumerate of DumpThread objects</returns> public IEnumerable <DumpThread> EnumerateThreads() { IMinidumpThreadList list = GetThreadList(); uint num = list.Count(); for (uint i = 0; i < num; i++) { MINIDUMP_THREAD rawThread = list.GetElement(i); yield return(new DumpThread(this, rawThread)); } }
// Internal helper to get the raw Minidump thread object. // Throws if thread is not found. private MINIDUMP_THREAD GetRawThread(int threadId) { IMinidumpThreadList list = GetThreadList(); uint num = list.Count(); for (uint i = 0; i < num; i++) { MINIDUMP_THREAD thread = list.GetElement(i); if (threadId == thread.ThreadId) { return(thread); } } return(null); }