public static void RegisterHystrixCommand <TService, TImplementation>(this ContainerBuilder container, string groupKey, string commandKey, IConfiguration config) where TService : class where TImplementation : class, TService { if (container == null) { throw new ArgumentNullException(nameof(container)); } if (string.IsNullOrEmpty(groupKey)) { throw new ArgumentNullException(nameof(groupKey)); } if (string.IsNullOrEmpty(commandKey)) { throw new ArgumentNullException(nameof(commandKey)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } RegisterHystrixCommand <TService, TImplementation>(container, HystrixCommandGroupKeyDefault.AsKey(groupKey), HystrixCommandKeyDefault.AsKey(commandKey), config); }
public static void AddHystrixCommand <TService, TImplementation>(this IServiceCollection services, string groupKey, string commandKey, IConfiguration config) where TService : class where TImplementation : class, TService { if (services == null) { throw new ArgumentNullException(nameof(services)); } if (string.IsNullOrEmpty(groupKey)) { throw new ArgumentNullException(nameof(groupKey)); } if (string.IsNullOrEmpty(commandKey)) { throw new ArgumentNullException(nameof(commandKey)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } AddHystrixCommand <TService, TImplementation>(services, HystrixCommandGroupKeyDefault.AsKey(groupKey), HystrixCommandKeyDefault.AsKey(commandKey), config); }
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); }