Пример #1
0
 public void AddOrUpdate <T>(MetricName name, T metric) where T : IMetric
 {
     _metrics.AddOrUpdate(name, metric, (n, m) => m);
 }
Пример #2
0
 public bool TryGetValue(MetricName name, out IMetric metric)
 {
     return(_metrics.TryGetValue(name, out metric));
 }
Пример #3
0
 public bool Contains(MetricName name)
 {
     return(_metrics.ContainsKey(name));
 }
Пример #4
0
 public IMetric GetOrAdd(MetricName name, IMetric metric)
 {
     return(_metrics.GetOrAdd(name, metric));
 }
Пример #5
0
 public IMetric this[MetricName name] => _metrics[name];
Пример #6
0
 public bool Contains(MetricName name)
 {
     return(TryGetValue(name, out _));
 }
Пример #7
0
 public void AddOrUpdate <T>(MetricName name, T metric) where T : IMetric
 {
     _metrics.Set(name.CacheKey, metric);
     UpdateManifest(name);
 }
Пример #8
0
 public IMetric this[MetricName name] => _metrics.Get <IMetric>(name.CacheKey);
Пример #9
0
 public bool TryGetValue(MetricName name, out IMetric metric)
 {
     metric = _metrics.Get <IMetric>(name.CacheKey);
     return(metric != null);
 }
Пример #10
0
 public void AddOrUpdate <T>(MetricName name, T metric) where T : GaugeMetric <bool>
 {
     _metrics.AddOrUpdate(name, metric, (n, m) => m);
 }
Пример #11
0
 public bool TryGetValue(MetricName name, out GaugeMetric <bool> metric)
 {
     return(_metrics.TryGetValue(name, out metric));
 }
Пример #12
0
 public GaugeMetric <bool> this[MetricName name] => _metrics[name];
Пример #13
0
 public GaugeMetric <bool> GetOrAdd(MetricName name, GaugeMetric <bool> metric)
 {
     return(_metrics.GetOrAdd(name, metric));
 }
Пример #14
0
 public bool Equals(MetricName other)
 {
     return(Equals(other.Name, Name) && other.Class == Class);
 }