public CachingProfileRepository( IProfileRepository innerRepository, EntitySquasherConfiguration configuration) { _innerRepository = innerRepository; _configuration = configuration; _cache = new Dictionary <string, CacheItem>(); }
private void AddConfiguration(IServiceCollection services, IConfigurationRoot rawConfiguration) { services.AddSingleton(rawConfiguration); var configuration = new EntitySquasherConfiguration(); rawConfiguration.Bind(configuration); services.AddSingleton(configuration); }
public void Arrange() { _innerRepositoryMock = new Mock <IProfileRepository>(); _configuration = new EntitySquasherConfiguration { Profile = new ProfileConfiguration { CacheDurationSeconds = 1, }, }; _cachingProfileRepository = new CachingProfileRepository( _innerRepositoryMock.Object, _configuration); _cancellationToken = new CancellationToken(); }
public IStoreDataAdapter(EntitySquasherConfiguration configuration, HttpClient httpClient, ISpiExecutionContextManager executionContextManager, ILoggerWrapper logger) : base(configuration.IStore.Url, configuration.IStore.SubscriptionKey, httpClient, executionContextManager, logger) { }
public BlobProfileRepository(EntitySquasherConfiguration configuration) { var serviceClient = new BlobServiceClient(configuration.Profile.BlobConnectionString); _containerClient = serviceClient.GetBlobContainerClient(configuration.Profile.ContainerName); }