GetData() public method

public GetData ( ) : byte[]
return byte[]
Example #1
0
		public void Start(string dbPath) {
			if (!SdeAppConfiguration.BackupsManagerState || _isCrashed) return;
			if (dbPath == null) throw new ArgumentNullException("dbPath");

			_currentId++;

			_validateOpened();

			BackupInfo info = new BackupInfo(new TextConfigAsker(new byte[] {}));
			info.DestinationPath = Path.GetDirectoryName(dbPath);

			if (!_paths.ContainsKey(_currentId)) {
				_paths[_currentId] = _getGrfPath();
			}

			_grf.Commands.AddFileAbsolute(GrfPath.Combine(_paths[_currentId], InfoName), info.GetData());

			List<string> paths = GetBackupFiles().OrderBy(long.Parse).ToList();

			while (paths.Count > MaximumNumberOfBackups) {
				RemoveBackupDelayed(paths[0]);
				paths.RemoveAt(0);
			}

			_isStarted = true;
		}
Example #2
0
        public void Start(string dbPath)
        {
            if (!SdeAppConfiguration.BackupsManagerState || _isCrashed)
            {
                return;
            }
            if (dbPath == null)
            {
                throw new ArgumentNullException("dbPath");
            }

            _currentId++;

            _validateOpened();

            BackupInfo info = new BackupInfo(new TextConfigAsker(new byte[] {}));

            info.DestinationPath = Path.GetDirectoryName(dbPath);

            if (!_paths.ContainsKey(_currentId))
            {
                _paths[_currentId] = _getGrfPath();
            }

            _grf.Commands.AddFileAbsolute(GrfPath.Combine(_paths[_currentId], InfoName), info.GetData());

            List <string> paths = GetBackupFiles().OrderBy(long.Parse).ToList();

            while (paths.Count > MaximumNumberOfBackups)
            {
                RemoveBackupDelayed(paths[0]);
                paths.RemoveAt(0);
            }

            _isStarted = true;
        }