public IFileBuilder CreateFileBuilder(NewFileDto newFile) { this._fileName = newFile.FileName; this._fileReaderTypeDto = newFile.FileReaderType; this._encryptionType = newFile.EncryptionType; return(this); }
public IEncryption Create(EncryptionTypeDto encryptionType) { switch (encryptionType) { case EncryptionTypeDto.NoEncryption: return(new NoEncryption()); case EncryptionTypeDto.ReverseEncryption: return(new ReverseEncryption()); default: throw new ArgumentOutOfRangeException(nameof(encryptionType), encryptionType, null); } }