public static void AddHystrixCommand <TService>(this IServiceCollection services, string groupKey, IConfiguration config) where TService : class
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            if (string.IsNullOrEmpty(groupKey))
            {
                throw new ArgumentNullException(nameof(groupKey));
            }

            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            AddHystrixCommand <TService>(services, HystrixCommandGroupKeyDefault.AsKey(groupKey), config);
        }
        public static void RegisterHystrixCommand <TService>(this ContainerBuilder container, string groupKey, IConfiguration config)
            where TService : class
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(container));
            }

            if (string.IsNullOrEmpty(groupKey))
            {
                throw new ArgumentNullException(nameof(groupKey));
            }

            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            RegisterHystrixCommand <TService>(container, HystrixCommandGroupKeyDefault.AsKey(groupKey), config);
        }
Exemple #3
0
 public static void AddHystrixCommand <TService, TImplementation>(this IServiceCollection services, string groupKey, string commandKey, IConfiguration config)
     where TService : class where TImplementation : class, TService
 {
     AddHystrixCommand <TService, TImplementation>(services, HystrixCommandGroupKeyDefault.AsKey(groupKey), HystrixCommandKeyDefault.AsKey(commandKey), config);
 }
Exemple #4
0
 public static void AddHystrixCommand <TService>(this IServiceCollection services, string groupKey, IConfiguration config) where TService : class
 {
     AddHystrixCommand <TService>(services, HystrixCommandGroupKeyDefault.AsKey(groupKey), config);
 }