コード例 #1
0
ファイル: BackupDataService.cs プロジェクト: itfenom/BackBock
        /// <summary>
        /// Saves the specified <see cref="BackupData"/> to disk.
        /// </summary>
        /// <param name="data">The data to save.</param>
        /// <param name="filename">The path to the stored <see cref="BackupData"/> on disk.</param>
        /// <param name="user">The requesting user with permissions.</param>
        /// <param name="parameters">Optional specified parameters. Can be <c>null</c>.</param>
        public void Save(BackupData data, string filename, IPrincipal user, StringDictionary parameters)
        {
            // use the
            var repo     = this.repositories.First(x => x.RepositoryType == BackupRepositoryType.FileSystemProvider);
            var fileRepo = (BackupDataFsRepository)repo;

            // var repo = repositories.OfType<BackupDataFsRepository>().First();
            fileRepo.SaveBackupData(data.ToDTO(), filename, parameters);

            // throw new NotImplementedException();
        }
コード例 #2
0
 public DTO.BackupData ConvertToDTO(BackupData source)
 {
     return source.ToDTO();
 }
コード例 #3
0
ファイル: BackupDataService.cs プロジェクト: Jedzia/BackBock
        /// <summary>
        /// Saves the specified <see cref="BackupData"/> to disk.
        /// </summary>
        /// <param name="data">The data to save.</param>
        /// <param name="filename">The path to the stored <see cref="BackupData"/> on disk.</param>
        /// <param name="user">The requesting user with permissions.</param>
        /// <param name="parameters">Optional specified parameters. Can be <c>null</c>.</param>
        public void Save(BackupData data, string filename, IPrincipal user, StringDictionary parameters)
        {
            // use the
            var repo = this.repositories.First(x => x.RepositoryType == BackupRepositoryType.FileSystemProvider);
            var fileRepo = (BackupDataFsRepository)repo;

            // var repo = repositories.OfType<BackupDataFsRepository>().First();
            fileRepo.SaveBackupData(data.ToDTO(), filename, parameters);

            // throw new NotImplementedException();
        }
コード例 #4
0
 public DTO.BackupData ConvertToDTO(BackupData source)
 {
     return(source.ToDTO());
 }