public NotificationRedisClientRequest(NotificationClientConfiguration configuration)
        {
            var serializer = new NewtonsoftSerializer();

            _cacheKey = configuration.RedisKey;
            _cache    = new StackExchangeRedisCacheClient(serializer, configuration.RedisConnectionString);
        }
Exemple #2
0
        public static IServiceCollection AddNotificationClient(this IServiceCollection services, NotificationClientConfiguration configuration)
        {
            var notificationRedisRepository = new NotificationRedisClientRequest(configuration);

            services.AddSingleton <INotificationClient>(new NotificationClient(notificationRedisRepository));

            return(services);
        }