예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
 public RecordingService(IRecordingRepository recordingRepository, MBFileService mbfileService = null)
 {
     RecordingRepository = recordingRepository;
     MBFileService       = mbfileService;
 }
예제 #4
0
 public AssetService(IAssetRepository assetRepository, MBFileService mbfileService = null)
 {
     AssetRepository = assetRepository;
     MBFileService   = mbfileService;
 }
예제 #5
0
        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));
        }