public StorageClientProviderAzure(IProviderFileService azureFileService, IProviderDirectoryService azureDirectoryService, IStorageSettings storageSettings) { _azureFileService = azureFileService; _azureDirectoryService = azureDirectoryService; StorageSettings = storageSettings; }
public EventHubConnectionContext(IHostSettings hostSettings, IStorageSettings storageSettings, Action <EventHubProducerClientOptions> configureOptions, CancellationToken cancellationToken) : base(cancellationToken) { _configureOptions = configureOptions; HostSettings = hostSettings; StorageSettings = storageSettings; }
public EventHubReceiveEndpointSpecification(string eventHubName, string consumerGroup, IHostSettings hostSettings, IStorageSettings storageSettings, Action <IEventHubReceiveEndpointConfigurator> configure) { _consumerGroup = consumerGroup; _hostSettings = hostSettings; _storageSettings = storageSettings; _configure = configure; Name = eventHubName; _endpointObservers = new ReceiveEndpointObservable(); }
public virtual async Task <SqlConnection> CreateAsync(IStorageSettings settings, IContext ctx = default) { settings.EnsureNotNull(nameof(settings)).EnsureReadOnly().EnsureValid(); // ctx.ThrowIfCancellationRequested(); var connectionStringBuilderFactory = ServiceProvider.GetRequiredService <IStorageDbConnectionStringBuilderFactory <SqlConnectionStringBuilder> >(); var connectionStringBuilder = await connectionStringBuilderFactory.CreateAsync(arg : settings.ConnectionString, ctx : ctx).Unwrap().ConfigureAwait(false); CreateConnection(builder: connectionStringBuilder, connection: out var connection, ctx: ctx); return(connection); }
public EventHubReceiveEndpointSpecification(IEventHubHostConfiguration hostConfiguration, string eventHubName, string consumerGroup, IHostSettings hostSettings, IStorageSettings storageSettings, Action <IEventHubReceiveEndpointConfigurator> configure) { _hostConfiguration = hostConfiguration; _eventHubName = eventHubName; _consumerGroup = consumerGroup; _hostSettings = hostSettings; _storageSettings = storageSettings; _configure = configure; EndpointName = $"{EventHubEndpointAddress.PathPrefix}/{_eventHubName}"; _endpointObservers = new ReceiveEndpointObservable(); }
/// <summary> /// Azure storage client builder /// </summary> /// <param name="storageSettings">Storage settings</param> /// <returns>AzureStorageClient</returns> public static AzureStorageClient Build(IStorageSettings storageSettings) { var account = CloudStorageAccount.Parse(storageSettings.ConnectionString); var storageFileClient = account.CreateCloudFileClient(); var azureFileService = new AzureFileService(); var azureDirectoryService = new AzureDirectoryService(storageFileClient); var storageClientAzureProvider = new StorageClientProviderAzure(azureFileService, azureDirectoryService, storageSettings); var directoryService = new DirectoryService(storageClientAzureProvider); var fileService = new FileService(storageClientAzureProvider); return(new AzureStorageClient(storageClientAzureProvider, directoryService, fileService)); }
public EventHubReceiveEndpointConfigurator(string eventHubName, string consumerGroup, IHostSettings hostSettings, IStorageSettings storageSettings, IBusInstance busInstance, IReceiveEndpointConfiguration endpointConfiguration) : base(endpointConfiguration) { _eventHubName = eventHubName; _consumerGroup = consumerGroup; _hostSettings = hostSettings; _storageSettings = storageSettings; _busInstance = busInstance; _endpointConfiguration = endpointConfiguration; CheckpointInterval = TimeSpan.FromMinutes(1); CheckpointMessageCount = 5000; ConcurrencyLimit = 1; }
public StorageRepository(IStorageContext context, IStorageSettings settings, ILogger <StorageRepository> logger) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (settings == null) { throw new ArgumentNullException(nameof(settings)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _context = context; _settings = settings; _logger = logger; }
public StorageContext(IStorageSettings storageSettings) { var retryPolicy = StorageRetryPolicy.GetDefaultRetryPolicy(); var client = new MinioClient( storageSettings.EndpointUrl, storageSettings.AccessKey, storageSettings.SecretKey ).WithRetryPolicy(retryPolicy); if (storageSettings.EnableHTTPS) { StorageObjects = client.WithSSL(); } else { ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true; StorageObjects = client; } }
public virtual SqlConnection Create(IStorageSettings settings, IContext ctx = default) => CreateAsync(settings: settings, ctx: ctx).WaitResultWithTimeout();
public virtual bool CanCreate(IStorageSettings settings) { settings.EnsureNotNull(nameof(settings)).EnsureReadOnly().EnsureValid(); // return(true); }
public ConnectionContextFactory(IHostSettings hostSettings, IStorageSettings storageSettings, Action <EventHubProducerClientOptions> configureOptions) { _hostSettings = hostSettings; _storageSettings = storageSettings; _configureOptions = configureOptions; }
public void Configure(IStorageSettings settings) { _settings = settings; _storageAccount = GetCloudStorageConnection(_settings.ConnectionString); _blobClient = _storageAccount.CreateCloudBlobClient(); }
public BlobStorageService(IStorageSettings settings) { Configure(settings); }
public CachedAppSettings(IAppSettings appSettings, IStorageSettings storageSettings, IDateTime dateTime) { _appSettings = appSettings; _storageSettings = storageSettings; _dateTime = dateTime; }
public LocalFileClient(IStorageSettings storageSettings) { _storageSettings = storageSettings ?? throw new ArgumentNullException(nameof(storageSettings)); }
ITaskWrap <SqlConnection> IOptionalFactory <IStorageSettings, SqlConnection> .CreateAsync(IStorageSettings settings, IContext ctx) => CreateAsync(settings: settings, ctx: ctx).Wrap();
public ConnectionContextSupervisor(IHostSettings hostSettings, IStorageSettings storageSettings, Action <EventHubProducerClientOptions> configureOptions) : base(new ConnectionContextFactory(hostSettings, storageSettings, configureOptions)) { }