Beispiel #1
0
        public static IBrighterHandlerBuilder UseSqliteOutbox(
            this IBrighterHandlerBuilder brighterBuilder, SqliteOutboxConfiguration configuration, ServiceLifetime serviceLifetime = ServiceLifetime.Singleton)
        {
            brighterBuilder.Services.AddSingleton <SqliteOutboxConfiguration>(configuration);

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

            return(brighterBuilder);
        }
Beispiel #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="SqliteOutbox" /> class.
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 public SqliteOutbox(SqliteOutboxConfiguration configuration)
 {
     _configuration            = configuration;
     ContinueOnCapturedContext = false;
 }