public static GalaxyOptions AddMySqlDomainReposity(this GalaxyOptions galaxy, Action <MySqlRepositoryOptions> setupAction)
        {
            if (null == setupAction)
            {
                throw new ArgumentNullException(nameof(setupAction));
            }

            galaxy.RegisterServiceExtensions(new MySqlRepositoryRegistration(setupAction));

            return(galaxy);
        }
Exemplo n.º 2
0
        public GalaxyBuilder(IServiceCollection services, Action <GalaxyOptions> setupAction)
        {
            if (null == setupAction)
            {
                throw new ArgumentNullException(nameof(setupAction));
            }

            Services = services;

            var options = new GalaxyOptions();

            setupAction(options);
            _options = options;
            Services.AddSingleton(options);

            AddCommonServices();

            AddExtensionServices();
        }
 public static GalaxyOptions AddRabbitMQ(this GalaxyOptions options, Action <RabbitMQOptions> steupAction)
 {
     options.RegisterServiceExtensions(new RabbitMQServicesRegistration(steupAction));
     return(options);
 }