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); }
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); }