public static ConfigOptions UseRabbitMQ(this ConfigOptions options, Action <RabbitMQOptions> configure)
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            options.RegisterExtension(new RabbitMQConfigOptionsExtension(configure));

            return(options);
        }
예제 #2
0
        public static ConfigOptions UseEntityFramework <TContext>(this ConfigOptions options, Action <EfCoreOptions> configure)
            where TContext : DbContext
        {
            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            options.RegisterExtension(new EfCoreConfigOptionsExtension(x =>
            {
                configure(x);
                x.Version       = options.Version;
                x.DbContextType = typeof(TContext);
            }));

            return(options);
        }
예제 #3
0
        public static ConfigOptions UseInMemoryStorage(this ConfigOptions options)
        {
            options.RegisterExtension(new InMemoryConfigOptionsExtension());

            return(options);
        }