Пример #1
0
 /// <summary>
 /// Performs the configuration and registers it
 /// </summary>
 /// <param name="configurer">Reference to the configuration for fluent syntax</param>
 /// <param name="storageClient">Reference to the single instance of Google StorageClient</param>
 /// <param name="options">Options to configure the storage bus</param>
 static void Configure(StandardConfigurer <IDataBusStorage> configurer, StorageClient storageClient, GoogleCloudStorageDataBusOptions options)
 {
     configurer.Register(c =>
     {
         var rebusLoggerFactory = c.Get <IRebusLoggerFactory>();
         var rebusTime          = c.Get <IRebusTime>();
         return(new GoogleCloudStorageDataBusStorage(storageClient, rebusLoggerFactory, rebusTime, options));
     });
 }
Пример #2
0
 /// <summary>
 /// Configures the data bus to store data in Google Cloud Storage
 /// </summary>
 /// <param name="configurer">Reference to the configuration for fluent syntax</param>
 /// <param name="storageClient">Reference to the single instance of Google StorageClient</param>
 /// <param name="options">Options to configure the storage bus</param>
 public static void StoreInGoogleCloudStorage(this StandardConfigurer <IDataBusStorage> configurer, StorageClient storageClient, GoogleCloudStorageDataBusOptions options)
 {
     if (configurer == null)
     {
         throw new ArgumentNullException(nameof(configurer));
     }
     if (storageClient == null)
     {
         throw new ArgumentNullException(nameof(storageClient));
     }
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     Configure(configurer, storageClient, options);
 }