Exemple #1
0
 public ImportListSyncService(IImportListFactory importListFactory,
                              IImportListExclusionService importListExclusionService,
                              IFetchAndParseImportList listFetcherAndParser,
                              IGoodreadsProxy goodreadsProxy,
                              IGoodreadsSearchProxy goodreadsSearchProxy,
                              IAuthorService authorService,
                              IBookService bookService,
                              IEditionService editionService,
                              IAddAuthorService addAuthorService,
                              IAddBookService addBookService,
                              IEventAggregator eventAggregator,
                              IManageCommandQueue commandQueueManager,
                              Logger logger)
 {
     _importListFactory          = importListFactory;
     _importListExclusionService = importListExclusionService;
     _listFetcherAndParser       = listFetcherAndParser;
     _goodreadsProxy             = goodreadsProxy;
     _goodreadsSearchProxy       = goodreadsSearchProxy;
     _authorService       = authorService;
     _bookService         = bookService;
     _editionService      = editionService;
     _addAuthorService    = addAuthorService;
     _addBookService      = addBookService;
     _eventAggregator     = eventAggregator;
     _commandQueueManager = commandQueueManager;
     _logger = logger;
 }
Exemple #2
0
        public BookInfoProxy(IHttpClient httpClient,
                             ICachedHttpResponseService cachedHttpClient,
                             IGoodreadsSearchProxy goodreadsSearchProxy,
                             IAuthorService authorService,
                             IBookService bookService,
                             IEditionService editionService,
                             IMetadataRequestBuilder requestBuilder,
                             Logger logger,
                             ICacheManager cacheManager)
        {
            _httpClient           = httpClient;
            _cachedHttpClient     = cachedHttpClient;
            _goodreadsSearchProxy = goodreadsSearchProxy;
            _authorService        = authorService;
            _bookService          = bookService;
            _editionService       = editionService;
            _requestBuilder       = requestBuilder;
            _cache  = cacheManager.GetCache <HashSet <string> >(GetType());
            _logger = logger;

            _authorCache = new CachingService(new MemoryCacheProvider(new MemoryCache(new MemoryCacheOptions {
                SizeLimit = 10
            })));
            _authorCache.DefaultCachePolicy = new CacheDefaults
            {
                DefaultCacheDurationSeconds = 60
            };
        }