Esempio n. 1
0
        public static IBrighterHandlerBuilder UseMySqlOutbox(
            this IBrighterHandlerBuilder brighterBuilder, MySqlOutboxConfiguration configuration, ServiceLifetime serviceLifetime = ServiceLifetime.Singleton)
        {
            brighterBuilder.Services.AddSingleton <MySqlOutboxConfiguration>(configuration);

            brighterBuilder.Services.Add(new ServiceDescriptor(typeof(IAmAnOutbox <Message>), BuildMySqlOutboxOutbox, serviceLifetime));
            brighterBuilder.Services.Add(new ServiceDescriptor(typeof(IAmAnOutboxAsync <Message>), BuildMySqlOutboxOutbox, serviceLifetime));

            return(brighterBuilder);
        }
Esempio n. 2
0
 public MySqlOutbox(MySqlOutboxConfiguration configuration)
 {
     _configuration            = configuration;
     ContinueOnCapturedContext = false;
 }