public DefaultEnvResponseWriter( IEnvOutputFormatter fallbackFormatter, IReadOnlyCollection <IEnvOutputFormatter> formatters) { if (formatters == null) { throw new ArgumentNullException(nameof(formatters)); } _formatters = new EnvFormatterCollection(formatters.ToList()); _fallbackFormatter = fallbackFormatter ?? throw new ArgumentNullException(nameof(fallbackFormatter)); }
public MetricsRoot( IMetrics metrics, MetricsOptions options, MetricsFormatterCollection metricsOutputFormatters, EnvFormatterCollection envOutputFormatters, IMetricsOutputFormatter defaultMetricsOutputFormatter, IEnvOutputFormatter defaultEnvOutputFormatter, EnvironmentInfoProvider environmentInfoProvider, MetricsReporterCollection reporterCollection, IRunMetricsReports reporter) { Options = options ?? throw new ArgumentNullException(nameof(options)); _metrics = metrics ?? throw new ArgumentNullException(nameof(metrics)); ReportRunner = reporter ?? throw new ArgumentNullException(nameof(reporter)); _environmentInfoProvider = new EnvironmentInfoProvider(); Reporters = reporterCollection ?? new MetricsReporterCollection(); OutputMetricsFormatters = metricsOutputFormatters ?? new MetricsFormatterCollection(); OutputEnvFormatters = envOutputFormatters ?? new EnvFormatterCollection(); DefaultOutputMetricsFormatter = defaultMetricsOutputFormatter; DefaultOutputEnvFormatter = defaultEnvOutputFormatter; _environmentInfoProvider = environmentInfoProvider; }
public MetricsEndpointsOptionsSetup(IReadOnlyCollection <IEnvOutputFormatter> envFormatters, IReadOnlyCollection <IMetricsOutputFormatter> metricsFormatters) { _envFormatters = new EnvFormatterCollection(envFormatters.ToList()); _metricsFormatters = new MetricsFormatterCollection(metricsFormatters.ToList()); }