public NotificationRedisClientRequest(NotificationClientConfiguration configuration) { var serializer = new NewtonsoftSerializer(); _cacheKey = configuration.RedisKey; _cache = new StackExchangeRedisCacheClient(serializer, configuration.RedisConnectionString); }
public static IServiceCollection AddNotificationClient(this IServiceCollection services, NotificationClientConfiguration configuration) { var notificationRedisRepository = new NotificationRedisClientRequest(configuration); services.AddSingleton <INotificationClient>(new NotificationClient(notificationRedisRepository)); return(services); }