public Metric(string name /*TelemetryClient telemetryClient*/) { Name = name ?? "null"; _aggregator = new MetricAggregator(DateTimeOffset.UtcNow); //this._telemetryClient = telemetryClient ?? throw new ArgumentNullException(nameof(telemetryClient)); Task.Run(AggregatorLoopAsync); }
void IDisposable.Dispose() { _isDisposed = true; _aggregator = null; }