Exemplo n.º 1
0
 public InMemoryMessageInbox(IMemoryCache cache, InboxOptions options, ILogger <InMemoryMessageInbox> logger)
 {
     _cache   = cache;
     _logger  = logger;
     _enabled = options.Enabled;
     _expiry  = options.ExpirySeconds;
 }
Exemplo n.º 2
0
 public MongoMessageInbox(IMongoDatabase database, IMongoClient client, InboxOptions options,
                          ILogger <MongoMessageInbox> logger)
 {
     _database = database;
     _client   = client;
     _logger   = logger;
     _enabled  = options.Enabled;
 }
Exemplo n.º 3
0
        public RedisMessageInbox(IDistributedCache cache, InboxOptions inboxOptions, RedisOptions redisOptions,
                                 ILogger <RedisMessageInbox> logger)
        {
            if (string.IsNullOrWhiteSpace(redisOptions.Instance))
            {
                throw new ArgumentException("Redis instance cannot be empty.", nameof(redisOptions.Instance));
            }

            _cache    = cache;
            _logger   = logger;
            _enabled  = inboxOptions.Enabled;
            _expiry   = inboxOptions.ExpirySeconds;
            _instance = redisOptions.Instance;
        }
Exemplo n.º 4
0
 public MongoInboxInitializer(IMongoDatabase database, InboxOptions options)
 {
     _database = database;
     _options  = options;
 }