public InstrumentFactory( InstrumentStateSnapshotCache instrumentStateSnapshotCache = null, IRendererFactory rendererFactory = null, IPerformanceCounterInstanceFactory performanceCounterInstanceFactory = null) { _instrumentStateSnapshotCache = instrumentStateSnapshotCache ?? new InstrumentStateSnapshotCache(); _rendererFactory = rendererFactory ?? new RendererFactory(); _performanceCounterInstanceFactory = performanceCounterInstanceFactory ?? new PerformanceCounterInstanceInstanceFactory(); }
internal Instrument( InstrumentType instrumentType, IInstrumentRenderer renderer, IInstrumentStateSnapshotCache instrumentStateSnapshotCache = null, IPerformanceCounterInstanceFactory performanceCounterInstanceFactory = null, IInstrumentRenderHelper instrumentRenderHelper = null, IInstrumentFormFactory instrumentFormFactory = null ) { Type = instrumentType; Renderer = renderer; _instrumentStateSnapshotCache = instrumentStateSnapshotCache ?? new InstrumentStateSnapshotCache(); _instrumentRenderHelper = instrumentRenderHelper ?? new InstrumentRenderHelper(); _instrumentFormFactory = instrumentFormFactory ?? new InstrumentFormFactory(); var performanceCounterInstanceFactory1 = performanceCounterInstanceFactory ?? new PerformanceCounterInstanceInstanceFactory(); _renderedFramesCounter = performanceCounterInstanceFactory1.CreatePerformanceCounterInstance(Application.ProductName, $"Rendered Frames per second - {instrumentType}"); _skippedFramesCounter = performanceCounterInstanceFactory1.CreatePerformanceCounterInstance(Application.ProductName, $"Skipped Frames per second - {instrumentType}"); _totalFramesCounter = performanceCounterInstanceFactory1.CreatePerformanceCounterInstance(Application.ProductName, $"Total Frames per second - {instrumentType}"); }
public PerformanceCounterInstaller(IPerformanceCounterInstanceFactory performanceCounterInstanceFactory = null) { _performanceCounterInstanceFactory = performanceCounterInstanceFactory ?? new PerformanceCounterInstanceInstanceFactory(); }