Example #1
0
 public static IMeter GetMeterForTenant(string tenant, IMeteringFactory factory)
 {
     try
     {
         if (IsDisabled() == true)
         {
             return(NullMeter.Instance);
         }
         return(_factory.CreateNew(tenant));
     }
     catch
     {
         return(NullMeter.Instance);
     }
 }
Example #2
0
 public static IMeter GetGlobalMeter(IMeteringFactory factory)
 {
     try
     {
         if (IsDisabled() == true)
         {
             return(NullMeter.Instance);
         }
         return(_factory.CreateNew());
     }
     catch
     {
         return(NullMeter.Instance);
     }
 }
Example #3
0
 public static void ConfigureMetrics(IMeteringFactory providerFactory)
 {
     _factory = providerFactory;
 }