Esempio n. 1
0
        private void Increment(int number)
        {
            if (!_dictionary.ContainsKey(number))
            {
                _dictionary.Add(number, _telemetryClient.GetMetric($"{nameof(Random)}-{number}"));
            }

            _dictionary[number].TrackValue(1);
        }
 public Looper(ILoggerFactory loggerFactory, IPickANumber pickANumber, IMyTelemetry telemetryClient)
 {
     _pickANumber = pickANumber;
     _metric      = telemetryClient.GetMetric($"{nameof(Looper)}.RunDuration");
     _logger      = loggerFactory.CreateLogger <Looper>();
 }