Esempio n. 1
0
 public DataBusIncomingStep(IDataBusStorage dataBusStorage)
 {
     if (dataBusStorage == null)
     {
         throw new ArgumentNullException(nameof(dataBusStorage));
     }
     _dataBusStorage = dataBusStorage;
 }
Esempio n. 2
0
 public DefaultDataBus(IDataBusStorage dataBusStorage)
 {
     if (dataBusStorage == null)
     {
         throw new ArgumentNullException(nameof(dataBusStorage));
     }
     _dataBusStorage = dataBusStorage;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates the decorator, wrapping the given <paramref name="innerDataBusStorage"/>
 /// </summary>
 public ZippingDataBusStorageDecorator(IDataBusStorage innerDataBusStorage, DataCompressionMode dataCompressionMode)
 {
     if (innerDataBusStorage == null)
     {
         throw new ArgumentNullException(nameof(innerDataBusStorage));
     }
     _innerDataBusStorage = innerDataBusStorage;
     _dataCompressionMode = dataCompressionMode;
 }
Esempio n. 4
0
        /// <summary>
        /// Establishes a fake presence of a configured data bus, using the given <see cref="InMemDataStore"/> to retrieve data
        /// </summary>
        public static IDisposable EstablishContext(InMemDataStore dataStore)
        {
            if (dataStore == null) throw new ArgumentNullException(nameof(dataStore));

            TestDataBusStorage = new InMemDataBusStorage(dataStore);

            return new CleanUp(() =>
            {
                TestDataBusStorage = null;
            });
        }
Esempio n. 5
0
        /// <summary>
        /// Establishes a fake presence of a configured data bus, using the given <see cref="InMemDataStore"/> to retrieve data
        /// </summary>
        public static IDisposable EstablishContext(InMemDataStore dataStore)
        {
            if (dataStore == null)
            {
                throw new ArgumentNullException(nameof(dataStore));
            }

            TestDataBusStorage = new InMemDataBusStorage(dataStore);

            return(new CleanUp(() =>
            {
                TestDataBusStorage = null;
            }));
        }
Esempio n. 6
0
 /// <summary>
 /// Creates the fake data bus, optionally using the given in-mem data store to store attachments
 /// </summary>
 public FakeDataBus(IRebusTime rebusTime)
 {
     // if there is an "ambient" storage, use that
     if (TestBackdoor.TestDataBusStorage != null)
     {
         _dataBusStorage = TestBackdoor.TestDataBusStorage;
     }
     // last resort: just fake it in mem
     else
     {
         _inMemDataStore = new InMemDataStore();
         _dataBusStorage = new InMemDataBusStorage(_inMemDataStore, rebusTime);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Creates the fake data bus, optionally using the given in-mem data store to store attachments
 /// </summary>
 /// <param name="dataStore"></param>
 public FakeDataBus(InMemDataStore dataStore = null)
 {
     // if a data store was passed in, we use that
     if (dataStore != null)
     {
         _dataBusStorage = new InMemDataBusStorage(dataStore);
     }
     // otherwise, if there is an "ambient" storage, use that
     else if (TestDataBusStorage != null)
     {
         _dataBusStorage = TestDataBusStorage;
     }
     // last resort: just fake it in mem
     else
     {
         _dataBusStorage = new InMemDataBusStorage(new InMemDataStore());
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Creates the fake data bus, optionally using the given in-mem data store to store attachments
 /// </summary>
 /// <param name="dataStore"></param>
 public FakeDataBus(InMemDataStore dataStore = null)
 {
     // if a data store was passed in, we use that
     if (dataStore != null)
     {
         _dataBusStorage = new InMemDataBusStorage(dataStore);
     }
     // otherwise, if there is an "ambient" storage, use that
     else if (TestDataBusStorage != null)
     {
         _dataBusStorage = TestDataBusStorage;
     }
     // last resort: just fake it in mem
     else
     {
         _dataBusStorage = new InMemDataBusStorage(new InMemDataStore());
     }
 }
Esempio n. 9
0
 protected override void SetUp()
 {
     _factory = new TDataStorageFactory();
     _storage = _factory.Create();
 }
Esempio n. 10
0
 public DataBusIncomingStep(IDataBusStorage dataBusStorage)
 {
     _dataBusStorage = dataBusStorage;
 }
Esempio n. 11
0
 public DataBusIncomingStep(IDataBusStorage dataBusStorage)
 {
     _dataBusStorage = dataBusStorage;
 }
Esempio n. 12
0
 public DataBusIncomingStep(IDataBusStorage dataBusStorage)
 {
     _dataBusStorage = dataBusStorage ?? throw new ArgumentNullException(nameof(dataBusStorage));
 }
 protected override void SetUp()
 {
     _factory = new SqlServerDataBusStorageFactory();
     _storage = _factory.Create();
 }
Esempio n. 14
0
 protected override void SetUp()
 {
     _factory = new AmazonS3DataBusStorageFactory();
     _storage = _factory.Create();
 }
Esempio n. 15
0
 public DefaultDataBus(IDataBusStorage dataBusStorage)
 {
     _dataBusStorage = dataBusStorage ?? throw new ArgumentNullException(nameof(dataBusStorage));
 }
Esempio n. 16
0
 public static void EnableTestMode(IDataBusStorage dataBusStorage)
 {
     TestDataBusStorage = dataBusStorage;
 }
Esempio n. 17
0
 protected override void SetUp()
 {
     _factory    = new TDataStorageFactory();
     _storage    = _factory.Create();
     _management = _storage as IDataBusStorageManagement;
 }
 /// <summary>
 /// Creates the decorator, wrapping the given <paramref name="innerDataBusStorage"/>
 /// </summary>
 public ZippingDataBusStorageDecorator(IDataBusStorage innerDataBusStorage, DataCompressionMode dataCompressionMode)
 {
     if (innerDataBusStorage == null) throw new ArgumentNullException(nameof(innerDataBusStorage));
     _innerDataBusStorage = innerDataBusStorage;
     _dataCompressionMode = dataCompressionMode;
 }
Esempio n. 19
0
 public DefaultDataBus(IDataBusStorage dataBusStorage)
 {
     _dataBusStorage = dataBusStorage;
 }
Esempio n. 20
0
 public DefaultDataBus(IDataBusStorage dataBusStorage, IDataBusStorageManagement dataBusStorageManagement)
 {
     _dataBusStorage           = dataBusStorage ?? throw new ArgumentNullException(nameof(dataBusStorage));
     _dataBusStorageManagement = dataBusStorageManagement;
 }
Esempio n. 21
0
 public DefaultDataBus(IDataBusStorage dataBusStorage)
 {
     _dataBusStorage = dataBusStorage;
 }