using ProfilerHelpers; using System; using System.Collections.Generic; namespace Tracing { public class PerProcessProfilingState : IDisposable { private bool _disposed; private readonly Dictionary _processNames = new Dictionary(); private readonly Dictionary _perProcessTypes = new Dictionary(); private readonly Dictionary _perProcessAllocations = new Dictionary(); private readonly Dictionary _methods = new Dictionary(); public Dictionary Names => _processNames; public Dictionary Types => _perProcessTypes; public Dictionary Allocations => _perProcessAllocations; public Dictionary Methods => _methods; public void Dispose() { if (_disposed) return; _disposed = true; foreach (var methodStore in _methods.Values) { methodStore.Dispose(); } } } }