public DepositService( ApplicationDbContext dbContext, IPhotoFileService photoFileService) { _dbContext = dbContext; _photoFileService = photoFileService; }
public static void SetUpTestCase(TestContext context) { // リポジトリ生成 var repos = new RepositoryFactory(PhotoFrame.Persistence.Type.EF); photoRepository = repos.PhotoRepository; keywordRepository = repos.KeywordRepository; ServiceFactory serviceFactory = new ServiceFactory(); photoFileService = serviceFactory.PhotoFileService; }
public PhotoFrameApplication() { this.ServiceFactory = new ServiceFactory(); this.repositoryMaster = new RepositoryMaster(); this.photoFileService = ServiceFactory.PhotoFileService; this.searchFolder = new SearchFolder(repositoryMaster, photoFileService); this.filter = new Filter(repositoryMaster); this.addKeyword = new AddKeyword(repositoryMaster); this.deleteKeyword = new DeleteKeyword(repositoryMaster); this.toggleIsFavorite = new ToggleIsFavorite(repositoryMaster); this.addAlbum = new AddAlbum(repositoryMaster); this.searchAlbum = new SearchAlbum(repositoryMaster); this.sortDateAscending = new SortDateAscending(); this.sortDateDescending = new SortDateDescending(); this.getAllAlbums = new GetAllAlbums(repositoryMaster); }
/// <summary> /// コンストラクタ /// </summary> public PhotoFrameForm() { InitializeComponent(); // リポジトリ生成・初期化 RepositoryFactory repositoryFactory = new RepositoryFactory(PhotoFrame.Persistence.Type.Csv); //RepositoryFactory repositoryFactory = new RepositoryFactory(PhotoFrame.Persistence.Type.EF); ServiceFactory serviceFactory = new ServiceFactory(); photoRepository = repositoryFactory.PhotoRepository; keywordRepository = repositoryFactory.KeywordRepository; photoFileService = serviceFactory.PhotoFileService; searchedPhotos = new List <Photo>().AsEnumerable(); controller = new Controller(keywordRepository, photoRepository, photoFileService); // キーワード解除用文字列の登録 comboBoxChangeKeyword.Items.Add("設定解除"); // 全アルバム名を取得し、アルバム変更リストをセット UpdateKeywordList(); }
/// <summary> /// コンストラクタ /// </summary> public Form1() { InitializeComponent(); // 各テストごとにデータベースファイルを削除 // (35-42をコメントアウトしても動きます) if (System.IO.File.Exists("_Photo.csv")) { System.IO.File.Delete("_Photo.csv"); } if (System.IO.File.Exists("_Album.csv")) { System.IO.File.Delete("_Album.csv"); } // メンバ変数初期化 RepositoryFactory repositoryFactory = new RepositoryFactory(PhotoFrame.Persistence.Type.Csv); ServiceFactory serviceFactory = new ServiceFactory(); photoRepository = repositoryFactory.PhotoRepository; albumRepository = repositoryFactory.AlbumRepository; photoFileService = serviceFactory.PhotoFileService; application = new PhotoFrameApplication(albumRepository, photoRepository, photoFileService); searchedPhotos = new List <Photo>().AsEnumerable(); flagAsync = false; // 全アルバム名を取得し、アルバム変更リストをセット IEnumerable <Album> allAlbums = albumRepository.Find((IQueryable <Album> albums) => albums); if (allAlbums != null) { foreach (Album album in allAlbums) { comboBox_ChangeAlbum.Items.Add(album.Name); } } }
public PhotoFrameApplication(IAlbumRepository albumRepository, IPhotoRepository photoRepository, IPhotoFileService photoFileService) { this.createAlbum = new CreateAlbum(albumRepository); this.searchAlbum = new SearchAlbum(photoRepository); this.searchDirectory = new SearchDirectory(photoRepository, photoFileService); this.toggleFavorite = new ToggleFavorite(photoRepository); this.changeAlbum = new ChangeAlbum(albumRepository, photoRepository); }
public SearchFolder(IPhotoRepository photoRepository, IPhotoFileService photoFileService) { _photoRepository = photoRepository; _photoFileService = photoFileService; }
public void SetUp() { service = new ServiceFactory().PhotoFileService; }
public SearchDirectory(IPhotoRepository photoRepository, IPhotoFileService photoFileService) { this.photoRepository = photoRepository; this.photoFileService = photoFileService; }
public CreatePhotoList(PhotoRepository photoRepository, IPhotoFileService photoFileService) { this.photoRepository = photoRepository; this.photoFileService = photoFileService; }
public ServiceFactory() { PhotoFileService = new PhotoFileService(); }
public MainFrame() { InitializeComponent(); // 後で消す service = new ServiceFactory().PhotoFileService; }
public FindDirectory(IAlbumRepository albumRepository, IPhotoRepository photoRepository) { this.albumRepository = albumRepository; this.photoRepository = photoRepository; service = new ServiceFactory().PhotoFileService; }
public PhotoFrameApplication(IKeywordRepository keywordRepository, IPhotoRepository photoRepository, IPhotoFileService photoFileService) { _registKeyword = new RegistKeyword(keywordRepository); _detailSearch = new DetailSearch(); _searchFolder = new SearchFolder(photoRepository, photoFileService); _toggleFavorite = new ToggleFavorite(photoRepository); _sortList = new SortList(); _changeKeyword = new ChangeKeyword(keywordRepository, photoRepository); _getKeywordList = new GetKeywordList(keywordRepository); }
public SearchFolder(RepositoryMaster repositoryMaster, IPhotoFileService photoFileService) { this.repositoryMaster = repositoryMaster; this.photoFileService = photoFileService; }
public Controller(IKeywordRepository keywordRepository, IPhotoRepository photoRepository, IPhotoFileService photoFileService) { this.application = new PhotoFrameApplication(keywordRepository, photoRepository, photoFileService); }