public void CreateBackup([NotNull] string fileName, BackupCreationMode mode)
        {
            if (string.IsNullOrEmpty(fileName)) throw new ArgumentNullException("fileName");

            switch (mode)
            {
                case BackupCreationMode.Disabled: return;
                case BackupCreationMode.Simple: CreateSimpleBackup(fileName); return;
                case BackupCreationMode.Extended: CreateExtendedBackup(fileName); return;
                default: throw new ArgumentOutOfRangeException("mode", mode, null);
            }
        }
Esempio n. 2
0
        public void CreateBackup([NotNull] string fileName, BackupCreationMode mode)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                throw new ArgumentNullException("fileName");
            }

            switch (mode)
            {
            case BackupCreationMode.Disabled: return;

            case BackupCreationMode.Simple: CreateSimpleBackup(fileName); return;

            case BackupCreationMode.Extended: CreateExtendedBackup(fileName); return;

            default: throw new ArgumentOutOfRangeException("mode", mode, null);
            }
        }