Esempio n. 1
0
 public InMemoryRegistry(
     IOptions <StorageChannelNames> storageChannelNamesAccessor,
     ILogger <InMemoryRegistry> logger)
 {
     _storageChannelNames = storageChannelNamesAccessor.Value;
     _logger = logger;
 }
Esempio n. 2
0
        public ComponentStorageProxy(HttpClient httpClient,
                                     IStorageDependencyWaitingService storageDependencyWaitingService,
                                     IOptions <ComponentStorageOptions> componentStorageOptionsAccessor,
                                     IOptions <StorageChannelNames> storageChannelNamesAccessor,
                                     IOptions <ComponentIdentifiers> componentIdentifiers,
                                     ILogger <ComponentStorageProxy> logger)
        {
            _componentIdentifier             = componentIdentifiers.Value;
            _httpClient                      = httpClient;
            _storageDependencyWaitingService = storageDependencyWaitingService;
            _logger = logger;
            _storageChannelNames = storageChannelNamesAccessor.Value;
            var baseUri = new Uri(componentStorageOptionsAccessor.Value.BaseUri);

            _addComponentUri  = new Uri(baseUri, componentStorageOptionsAccessor.Value.AddOrUpdateComponentRoute);
            _getComponentUri  = new Uri(baseUri, componentStorageOptionsAccessor.Value.GetComponentRoute);
            _getComponentsUri = new Uri(baseUri, componentStorageOptionsAccessor.Value.GetComponentsRoute);
            _getComponentJobConfigUriTemplate    = baseUri.AbsoluteUri.TrimEnd('/') + componentStorageOptionsAccessor.Value.ComponentJobConfigRoute;
            _insertComponentJobConfigUriTemplate = baseUri.AbsoluteUri.TrimEnd('/') + componentStorageOptionsAccessor.Value.ComponentJobConfigRoute;
        }