Esempio n. 1
0
        public ImageDownloader(FilepathManager filepathManager, InMemoryManager inMemoryManager)
        {
            if (filepathManager == null)
            {
                throw new ArgumentNullException(nameof(filepathManager));
            }
            if (inMemoryManager == null)
            {
                throw new ArgumentNullException(nameof(inMemoryManager));
            }

            FilepathManagerInstance = filepathManager;
            InMemoryManagerInstance = inMemoryManager;
            ImagesQueue             = new ConcurrentQueue <CharacterImageIdentifier>();
            Worker = new BackgroundWorker();
            Worker.WorkerSupportsCancellation = true;
            Worker.DoWork += DownloadImagesQueueProcessing_DoWork;

            StartDownloadQueue();
        }
Esempio n. 2
0
 public ImageRetriever(FilepathManager filepathManager, ImageCache imageCache)
 {
     FilepathManager = filepathManager;
     ImageCache      = imageCache;
 }
Esempio n. 3
0
 public DownloadImagesQueueDoWorkArgument(ConcurrentQueue <CharacterImageIdentifier> queue, FilepathManager filepathManagerInstance)
 {
     Queue = queue;
     FilepathManagerInstance = filepathManagerInstance;
 }
 public SQLiteDatabaseManager(FilepathManager filepathManager)
 {
     FilepathManagerInstance = filepathManager;
     ConnectionStringFormat  = "Data Source={0};Version=3;";
     Initialize();
 }