示例#1
0
 private static IMetric GetOrRegisterMetric(string entry)
 {
     var metric = MetricRepository.GetByName(entry);
     if (metric == null)
     {
         metric = new InMemoryMetric(entry);
         MetricRepository.Save(metric);
     }
     return metric;
 }
示例#2
0
        private static IMetric GetOrRegisterMetric(string entry)
        {
            var metric = MetricRepository.GetByName(entry);

            if (metric == null)
            {
                metric = new InMemoryMetric(entry);
                MetricRepository.Save(metric);
            }
            return(metric);
        }