Beispiel #1
0
        public FilmFromApi(IFileSystem fileSystem = null, IRatingService ratingService = null, IResultPicker resultPicker = null)
        {
            this.fileSystem    = fileSystem ?? new FileSystem();
            this.ratingService = ratingService ?? new RatingService();
            this.resultPicker  = resultPicker ?? new FirstResultPicker();

            this.idLookupService = new FilmLookupService();
        }
Beispiel #2
0
 public GuiFilm(string path, IFileSystem fileSystem, IResultPicker resultPicker, IFilmProcessor autoProcessor = null) : base(path, fileSystem, resultPicker)
 {
     if (autoProcessor != null)
     {
         FetchData(() => autoProcessor.Process(this));
     }
     else
     {
         FetchData();
     }
 }
Beispiel #3
0
 public GuiFilm(string path, IFileSystem fileSystem, IResultPicker resultPicker, IFilmProcessor autoProcessor = null)
     : base(path, fileSystem, resultPicker)
 {
     if (autoProcessor != null)
     {
         FetchData(() => autoProcessor.Process(this));
     }
     else
     {
         FetchData();
     }
 }
Beispiel #4
0
 /// <summary>
 /// Allows GuiFilms to be built from a non STA thread.
 /// Usage: Create the factory on the UI thread and then call BuildFilm from anywhere.
 /// </summary>
 public GuiFilmFactory()
 {
     resultPicker = new GuiResultPickerService(Application.Current.MainWindow);
 }
Beispiel #5
0
 /// <summary>
 /// Allows GuiFilms to be built from a non STA thread.
 /// Usage: Create the factory on the UI thread and then call BuildFilm from anywhere.
 /// </summary>
 public GuiFilmFactory()
 {
     resultPicker = new GuiResultPickerService(Application.Current.MainWindow);
 }
Beispiel #6
0
 public CachedFilm(string path, IFileSystem fileSystem = null, IResultPicker resultPicker = null) : this(path, fileSystem, new DiskCachedRatingService(), resultPicker)
 {
 }
Beispiel #7
0
 public CachedFilm(string path, IFileSystem fileSystem, IRatingService ratingService, IResultPicker resultPicker = null) : base(path, fileSystem, ratingService, resultPicker)
 {
     this.idLookupService = new CachingFilmLookupService(Path, fileSystem);
 }
Beispiel #8
0
 public FilmFromFolder(string path, IFileSystem fileSystem, IRatingService ratingService = null, IResultPicker resultPicker = null) : base(fileSystem, ratingService, resultPicker)
 {
     this.Path  = path;
     FolderName = this.fileSystem.Path.GetFileName(path);
 }