Exemple #1
0
 public PhotographServices(IDbContextScopeFactory dbContextScopeFactory, IPhotographRepository photographRepository)
 {
     if (dbContextScopeFactory == null) throw new ArgumentNullException("dbContextScopeFactory");
     if (photographRepository == null) throw new ArgumentNullException("photographRepository");
     _dbContextScopeFactory = dbContextScopeFactory;
     _photographRepository = photographRepository;
 }
Exemple #2
0
 public PhotographService(
     IPhotographRepository photographRepository,
     IImageMetadataExtractor imageMetadataExtractor)
 {
     this.photographRepository   = photographRepository;
     this.imageMetadataExtractor = imageMetadataExtractor;
 }
Exemple #3
0
 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>();
 }
Exemple #6
0
 public MongoDbResolver(IPhotographRepository photographRepository, Photograph photograph)
 {
     this.photographRepository = photographRepository;
     this.photograph           = photograph;
     //this.logger = loggerFactory.CreateLogger<MongoDbResolver>();
 }