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(); }
public GuiFilm(string path, IFileSystem fileSystem, IResultPicker resultPicker, IFilmProcessor autoProcessor = null) : base(path, fileSystem, resultPicker) { if (autoProcessor != null) { FetchData(() => autoProcessor.Process(this)); } else { FetchData(); } }
/// <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); }
public CachedFilm(string path, IFileSystem fileSystem = null, IResultPicker resultPicker = null) : this(path, fileSystem, new DiskCachedRatingService(), resultPicker) { }
public CachedFilm(string path, IFileSystem fileSystem, IRatingService ratingService, IResultPicker resultPicker = null) : base(path, fileSystem, ratingService, resultPicker) { this.idLookupService = new CachingFilmLookupService(Path, fileSystem); }
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); }