public PhotographServices(IDbContextScopeFactory dbContextScopeFactory, IPhotographRepository photographRepository) { if (dbContextScopeFactory == null) throw new ArgumentNullException("dbContextScopeFactory"); if (photographRepository == null) throw new ArgumentNullException("photographRepository"); _dbContextScopeFactory = dbContextScopeFactory; _photographRepository = photographRepository; }
public PhotographService( IPhotographRepository photographRepository, IImageMetadataExtractor imageMetadataExtractor) { this.photographRepository = photographRepository; this.imageMetadataExtractor = imageMetadataExtractor; }
public MongoDbImageProvider(IPhotographRepository photographRepository, IMongoDbResolverFactory mongoDbResolverFactory, ILogger <MongoDbImageProvider> logger) { this.photographRepository = photographRepository; this.mongoDbResolverFactory = mongoDbResolverFactory; this.logger = logger; this.validCache = new Dictionary <string, bool>(); }
public void Setup() { _dbContextScopeFactory = Substitute.For<IDbContextScopeFactory>(); _ambientDbContextLocator = Substitute.For<IAmbientDbContextLocator>(); _photographRepository = Substitute.For<IPhotographRepository>(); _dbContext = Substitute.For<IDbContextScope>(); _dbContextScopeFactory.Create().Returns(_dbContext); _photographService = new PhotographServices(_dbContextScopeFactory, _photographRepository); }
public MongoDbResolverFactory(IPhotographRepository photographRepository, ILoggerFactory loggerFactory) { this.photographRepository = photographRepository; this.loggerFactory = loggerFactory; this.resolverCache = new Dictionary <string, MongoDbResolver>(); }
public MongoDbResolver(IPhotographRepository photographRepository, Photograph photograph) { this.photographRepository = photographRepository; this.photograph = photograph; //this.logger = loggerFactory.CreateLogger<MongoDbResolver>(); }