コード例 #1
0
 public static void RegisterMetricsPublisher(HystrixMetricsPublisher impl)
 {
     if (!metricsPublisher.CompareAndSet(null, impl))
     {
         throw new InvalidOperationException("Another strategy was already registered.");
     }
 }
コード例 #2
0
#pragma warning disable S4136 // Method overloads should be grouped together
        public static void RegisterMetricsPublisher(HystrixMetricsPublisher impl)
#pragma warning restore S4136 // Method overloads should be grouped together
        {
            if (!_metricsPublisher.CompareAndSet(null, impl))
            {
                throw new InvalidOperationException("Another strategy was already registered.");
            }
        }