void IDisposable.Dispose() { GC.SuppressFinalize(this); if (this.pcGet != null) { this.pcGet.Dispose(); this.pcSet.Dispose(); this.pcAdd.Dispose(); this.pcReplace.Dispose(); this.pcDelete.Dispose(); this.pcIncrement.Dispose(); this.pcDecrement.Dispose(); this.pcAppend.Dispose(); this.pcPrepend.Dispose(); this.pcGet = null; this.pcSet = null; this.pcAdd = null; this.pcReplace = null; this.pcDelete = null; this.pcIncrement = null; this.pcDecrement = null; this.pcAppend = null; this.pcPrepend = null; } }
public DefaultPerformanceMonitor(string instance) { this.pcGet = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Get); this.pcSet = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Set); this.pcAdd = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Add); this.pcReplace = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Replace); this.pcDelete = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Delete); this.pcIncrement = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Increment); this.pcDecrement = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Decrement); this.pcAppend = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Append); this.pcPrepend = new OpMonitor(instance, DefaultPerformanceMonitor.CategoryName, DefaultPerformanceMonitor.Names.Prepend); }