Esempio n. 1
0
        public static IDrexBuilder AddRedis(this IDrexBuilder builder,
                                            Func <IRedisOptionsBuilder, IRedisOptionsBuilder> buildOptions)
        {
            var options = buildOptions(new RedisOptionsBuilder()).Build();

            return(builder.AddRedis(options));
        }
Esempio n. 2
0
        public static IDrexBuilder AddRedis(this IDrexBuilder builder, string sectionName = SectionName)
        {
            if (string.IsNullOrWhiteSpace(sectionName))
            {
                sectionName = SectionName;
            }

            var options = builder.GetOptions <RedisOptions>(sectionName);

            return(builder.AddRedis(options));
        }