RSG.Metrics.Metrics C# (CSharp) Method

Metrics() public method

public Metrics ( IMetricsEmitter emitter, int batchSize = 1 ) : System
emitter IMetricsEmitter
batchSize int
return System
        public Metrics(IMetricsEmitter emitter, int batchSize = 1)
        {
            if (emitter == null)
            {
                throw new ArgumentNullException();
            }
            if (batchSize < 1)
            {
                throw new ArgumentException("Batch size must be at least 1");
            }

            this.emitter = emitter;
            this.batchSize = batchSize;
            this.properties = new Dictionary<string, string>();
            this.metricQueue = new Metric[batchSize];
            this.metricQueueIndex = 0;
        }