/// <summary> /// Initializes a new instance of the <see cref="DumpInformationRepository" /> class. /// </summary> /// <param name="dataTarget">The data target.</param> /// <param name="runtime">The runtime.</param> /// <param name="dumpFile">The dump file.</param> /// <exception cref="ArgumentNullException">dataTarget</exception> /// <exception cref="System.ArgumentNullException">dataTarget</exception> public DumpInformationRepository(IDataTarget dataTarget, IClrRuntime runtime, FileInfo dumpFile) { CpuUtilization = runtime.ThreadPool.CpuUtilization; DumpFile = dumpFile; HeapCount = runtime.HeapCount; IsMiniDump = dataTarget?.IsMinidump ?? throw new ArgumentNullException(nameof(dataTarget)); IsServerGc = runtime.IsServerGc; MaxNumberFreeIoCompletionPorts = runtime.ThreadPool.MaxFreeCompletionPorts; MaxNumberIoCompletionPorts = runtime.ThreadPool.MaxCompletionPorts; MaxThreads = runtime.ThreadPool.MaxThreads; MinNumberIoCompletionPorts = runtime.ThreadPool.MinCompletionPorts; MinThreads = runtime.ThreadPool.MinThreads; NumberFreeIoCompletionPorts = runtime.ThreadPool.FreeCompletionPortCount; NumberIdleThreads = runtime.ThreadPool.IdleThreads; NumRunningThreads = runtime.ThreadPool.RunningThreads; ModuleInfosInternal = dataTarget?.EnumerateModules().ToList(); SymbolCache = dataTarget.SymbolLocator.SymbolCache; SymbolPath = dataTarget.SymbolLocator.SymbolPath; TotalHeapSize = runtime.Heap.TotalHeapSize; TotalThreads = runtime.ThreadPool.TotalThreads; StartTimeUtc = DateTime.UtcNow; }