public SqlServerFhirModel( SqlServerDataStoreConfiguration configuration, SchemaInformation schemaInformation, ISearchParameterDefinitionManager searchParameterDefinitionManager, IOptions <SecurityConfiguration> securityConfiguration, ILogger <SqlServerFhirModel> logger) { EnsureArg.IsNotNull(configuration, nameof(configuration)); EnsureArg.IsNotNull(schemaInformation, nameof(schemaInformation)); EnsureArg.IsNotNull(searchParameterDefinitionManager, nameof(searchParameterDefinitionManager)); EnsureArg.IsNotNull(securityConfiguration?.Value, nameof(securityConfiguration)); EnsureArg.IsNotNull(logger, nameof(logger)); _configuration = configuration; _schemaInformation = schemaInformation; _logger = logger; _searchParameterDefinitionManager = searchParameterDefinitionManager; _securityConfiguration = securityConfiguration.Value; _initializationOperation = new RetryableInitializationOperation(Initialize); if (schemaInformation.Current != null) { // kick off initialization so that it can be ready for requests. Errors will be observed by requests when they call the method. EnsureInitialized(); } }
public TableServiceClientProvider( TableServiceClient tableServiceClient, ITableServiceClientInitializer tableServiceClientInitializer, ILogger <TableServiceClientProvider> logger) { EnsureArg.IsNotNull(tableServiceClient, nameof(tableServiceClient)); EnsureArg.IsNotNull(tableServiceClientInitializer, nameof(tableServiceClientInitializer)); EnsureArg.IsNotNull(logger, nameof(logger)); _tableServiceClient = tableServiceClient; _initializationOperation = new RetryableInitializationOperation( () => tableServiceClientInitializer.InitializeDataStoreAsync(_tableServiceClient)); }
public TableClientProvider( TableDataStoreConfiguration tableDataStoreConfiguration, ITableClientInitializer tableClientIntilizer, ILogger <TableClientProvider> logger) { EnsureArg.IsNotNull(tableDataStoreConfiguration, nameof(tableDataStoreConfiguration)); EnsureArg.IsNotNull(tableClientIntilizer, nameof(tableClientIntilizer)); EnsureArg.IsNotNull(logger, nameof(logger)); _cloudTableClient = tableClientIntilizer.CreateTableClient(); _initializationOperation = new RetryableInitializationOperation( () => tableClientIntilizer.IntializeDataStoreAsync(_cloudTableClient)); }
public BlobClientProvider( BlobDataStoreConfiguration blobDataStoreConfiguration, IBlobClientInitializer blobClientInitializer, ILogger <BlobClientProvider> logger, IEnumerable <IBlobContainerInitializer> collectionInitializers) { EnsureArg.IsNotNull(blobDataStoreConfiguration, nameof(blobDataStoreConfiguration)); EnsureArg.IsNotNull(blobClientInitializer, nameof(blobClientInitializer)); EnsureArg.IsNotNull(logger, nameof(logger)); EnsureArg.IsNotNull(collectionInitializers, nameof(collectionInitializers)); _blobServiceClient = blobClientInitializer.CreateBlobClient(blobDataStoreConfiguration); _initializationOperation = new RetryableInitializationOperation( () => blobClientInitializer.InitializeDataStoreAsync(_blobServiceClient, blobDataStoreConfiguration, collectionInitializers)); }
public SqlIndexSchema( SchemaInformation schemaInformation, ILogger <SqlIndexSchema> logger) { EnsureArg.IsNotNull(schemaInformation, nameof(schemaInformation)); EnsureArg.IsNotNull(logger, nameof(logger)); _schemaInformation = schemaInformation; _logger = logger; _initializationOperation = new RetryableInitializationOperation(InitializeAsync); if (schemaInformation.Current != null) { // kick off initialization so that it can be ready for requests. Errors will be observed by requests when they call the method. EnsureInitialized(); } }