Exemplo n.º 1
0
        /// <summary>
        /// Configures the storage of subscriptions in Amazon S3
        /// </summary>
        public static void StoreInAmazonS3(this StandardConfigurer <ISubscriptionStorage> configurer, string accessKeyId, string secretAccessKey, RegionEndpoint regionEndpoint, string bucketName, TransferUtilityConfig transferUtilityConfig = null)
        {
            if (configurer == null)
            {
                throw new ArgumentNullException(nameof(configurer));
            }
            if (accessKeyId == null)
            {
                throw new ArgumentNullException(nameof(accessKeyId));
            }
            if (secretAccessKey == null)
            {
                throw new ArgumentNullException(nameof(secretAccessKey));
            }
            if (regionEndpoint == null)
            {
                throw new ArgumentNullException(nameof(regionEndpoint));
            }

            AmazonS3DataBusOptions options = (bucketName != null) ? new AmazonS3DataBusOptions(bucketName) : null;

            Configure(configurer, new BasicAWSCredentials(accessKeyId, secretAccessKey), new AmazonS3Config {
                RegionEndpoint = regionEndpoint
            }, options);
        }
Exemplo n.º 2
0
 private static void Configure(StandardConfigurer <ISubscriptionStorage> configurer, AWSCredentials credentials, AmazonS3Config config, AmazonS3DataBusOptions options)
 {
     configurer.Register(c => new AmazonS3SubscriptionsStorage(credentials, config, options, c.Get <IRebusLoggerFactory>()));
 }
Exemplo n.º 3
0
 private static void Configure(StandardConfigurer <ISubscriptionStorage> configurer, Func <IAmazonS3> amazonS3Factory, AmazonS3DataBusOptions options)
 {
     configurer.Register(c => new AmazonS3SubscriptionsStorage(amazonS3Factory, options, c.Get <IRebusLoggerFactory>()));
 }
Exemplo n.º 4
0
        /// <summary>
        /// Configures the storage of subscriptions in Amazon S3
        /// </summary>
        public static void StoreInAmazonS3(this StandardConfigurer <ISubscriptionStorage> configurer, Func <IAmazonS3> amazonS3Factory, AmazonS3DataBusOptions options)
        {
            if (amazonS3Factory == null)
            {
                throw new ArgumentNullException(nameof(amazonS3Factory));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            Configure(configurer, amazonS3Factory, options);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Configures the storage of subscriptions in Amazon S3
        /// </summary>
        public static void StoreInAmazonS3(this StandardConfigurer <ISubscriptionStorage> configurer,
                                           AWSCredentials credentials, AmazonS3Config config, AmazonS3DataBusOptions options)
        {
            if (configurer == null)
            {
                throw new ArgumentNullException(nameof(configurer));
            }
            if (credentials == null)
            {
                throw new ArgumentNullException(nameof(credentials));
            }
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            Configure(configurer, credentials, config, options);
        }
Exemplo n.º 6
0
 private static void Configure(StandardConfigurer <IDataBusStorage> configurer, AWSCredentials credentials, AmazonS3Config config, AmazonS3DataBusOptions options, TransferUtilityConfig transferUtilityConfig)
 {
     configurer.Register(c => new AmazonS3DataBusStorage(credentials, config, options, transferUtilityConfig, c.Get <IRebusLoggerFactory>()));
 }
Exemplo n.º 7
0
        /// <summary>
        /// Configures the data bus to store data in Amazon S3
        /// </summary>
        public static void StoreInAmazonS3(this StandardConfigurer <IDataBusStorage> configurer, AWSCredentials credentials, AmazonS3Config config, AmazonS3DataBusOptions options, TransferUtilityConfig transferUtilityConfig = null)
        {
            if (configurer == null)
            {
                throw new ArgumentNullException(nameof(configurer));
            }
            if (credentials == null)
            {
                throw new ArgumentNullException(nameof(credentials));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            Configure(configurer, credentials, config, options, transferUtilityConfig ?? new TransferUtilityConfig());
        }
 static void Configure(StandardConfigurer <ISubscriptionStorage> configurer, AWSCredentials credentials, AmazonS3Config config, AmazonS3DataBusOptions options)
 {
     configurer.Register(c => new AmazonS3SubscriptionsStorage(credentials, config, options));
 }
 static void Configure(StandardConfigurer <ISubscriptionStorage> configurer, Func <IAmazonS3> amazonS3Factory, AmazonS3DataBusOptions options)
 {
     configurer.Register(c => new AmazonS3SubscriptionsStorage(amazonS3Factory, options));
 }
        static void Configure(StandardConfigurer <IDataBusStorage> configurer, AmazonS3Config config, AmazonS3DataBusOptions options, TransferUtilityConfig transferUtilityConfig)
        {
            configurer.Register(c =>
            {
                var rebusLoggerFactory = c.Get <IRebusLoggerFactory>();
                var rebusTime          = c.Get <IRebusTime>();

                return(new AmazonS3DataBusStorage(config, options, transferUtilityConfig, rebusLoggerFactory, rebusTime));
            });
        }