public static RecordingService CreateRecordingService(string backupPath, MBFileService mbfileService = null) { var contextFactory = new VoiceNotesContextFactory(backupPath); var voiceNoteContext = contextFactory.CreateDbContext(); var recordingRepository = new RecordingRepository(voiceNoteContext); return(new RecordingService(recordingRepository, mbfileService)); }
public static MBFileService CreateMBFileService(Backup backup) { //todo: handle exception if cannot create repository! IMBFileRepository <IMBFile> mbfileRepository = MBFileRepositoryFactory.CreateMBFileRepository(backup); MBFileService mbfileService = new MBFileService(mbfileRepository); return(mbfileService); }
public RecordingService(IRecordingRepository recordingRepository, MBFileService mbfileService = null) { RecordingRepository = recordingRepository; MBFileService = mbfileService; }
public AssetService(IAssetRepository assetRepository, MBFileService mbfileService = null) { AssetRepository = assetRepository; MBFileService = mbfileService; }
public static AssetService CreateAssetService(string backupPath, Version productVersion, MBFileService mbfileService = null) { var contextFactory = new PhotosContextFactory(backupPath, productVersion); var photosContext = contextFactory.CreateDbContext(); var assetRepository = new AssetRepository(photosContext); return(new AssetService(assetRepository, mbfileService)); }