Beispiel #1
0
        internal MetricsPipe(GraphiteConfiguration configuration, IMetricsPipeProvider provider, Func<IStopwatch> watch)
        {
            if (configuration == null)
                throw new ArgumentNullException("configuration");

            if (provider == null)
                throw new ArgumentNullException("provider");

            if (watch == null)
                throw new ArgumentNullException("watch");

            this.factory = new ChannelFactory(configuration.Graphite, configuration.StatsD);

            MetricsPipe.provider = provider;

            this.watch = watch();
        }
        internal MetricsPipe(GraphiteConfiguration configuration, IMetricsPipeProvider provider, Func <IStopwatch> watch)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }

            if (watch == null)
            {
                throw new ArgumentNullException("watch");
            }

            this.factory = new ChannelFactory(configuration.Graphite, configuration.StatsD);

            MetricsPipe.provider = provider;

            this.watch = watch();
        }