예제 #1
0
        public SnapshotService(DatabaseFileProvider dbFileProvider,
                               ISnapshotFileService fileService,
                               ILog logger)
        {
            if (dbFileProvider == null)
            {
                throw new ArgumentNullException(nameof(dbFileProvider));
            }
            if (fileService == null)
            {
                throw new ArgumentNullException(nameof(fileService));
            }

            this.fileService    = fileService;
            this.logger         = logger ?? throw new ArgumentNullException(nameof(logger));
            this.dbFileProvider = dbFileProvider;
        }
예제 #2
0
        public SqliteBackupRestorer(IProvidesBackupFileInfo backupFileProvider,
                                    DatabaseFileProvider fileProvider,
                                    ISnapshotFileService fileService)
        {
            if (fileService == null)
            {
                throw new ArgumentNullException(nameof(fileService));
            }
            if (fileProvider == null)
            {
                throw new ArgumentNullException(nameof(fileProvider));
            }
            if (backupFileProvider == null)
            {
                throw new ArgumentNullException(nameof(backupFileProvider));
            }

            this.backupFileProvider = backupFileProvider;
            this.fileProvider       = fileProvider;
            this.fileService        = fileService;
        }
예제 #3
0
        public SqliteBackupCreator(IProvidesBackupFileInfo backupFileProvider,
                                   ISnapshotFileService snapshotFileService,
                                   DatabaseFileProvider dbFileProvider)
        {
            if (dbFileProvider == null)
            {
                throw new ArgumentNullException(nameof(dbFileProvider));
            }
            if (backupFileProvider == null)
            {
                throw new ArgumentNullException(nameof(backupFileProvider));
            }
            if (snapshotFileService == null)
            {
                throw new ArgumentNullException(nameof(snapshotFileService));
            }

            this.dbFileProvider      = dbFileProvider;
            this.backupFileProvider  = backupFileProvider;
            this.snapshotFileService = snapshotFileService;
        }