/// <exception cref="ArgumentNullException">any argument is null</exception> public CipherFormPresenter(ICipherForm cipherForm, IList <FileSystemEntity> inputFileEntities, IRsaFactory rsaFactory, KeySerializer keySerializer, ICommandsContainer commandsContainer, IFileUnifier fileUnifier, IEnvironmentHelper environmentHelper, IMessageHelper messageHelper, Options options) { Checker.CheckNull(cipherForm, keySerializer, commandsContainer); this.cipherForm = cipherForm; this.inputFileEntities = inputFileEntities; this.rsaFactory = rsaFactory; this.keySerializer = keySerializer; this.commandsContainer = commandsContainer; this.fileUnifier = fileUnifier; this.environmentHelper = environmentHelper; this.messageHelper = messageHelper; this.options = options; cipherForm.InputFileEntities = inputFileEntities; cipherForm.TotalLength = GetTotalLength(); cipherForm.OutputFileName = GetOutputFileName(); cipherForm.ZipСompression = options.ZipСompression; cipherForm.Cipher += cipherForm_Cipher; cipherForm.CancelCipher += cipherForm_CancelCipher; cipherForm.OutputFileNameChanged += cipherForm_OutputFileNameChanged; cipherForm.PublicKeyChanged += cipherForm_PublicKeyChanged; }
public CipherManager(IRsaFileCipher rsaFileCipher, IFileUnifier fileUnifier, IEnvironmentHelper environmentHelper, IMessageHelper messageHelper) { this.rsaFileCipher = rsaFileCipher; this.fileUnifier = fileUnifier; this.environmentHelper = environmentHelper; this.messageHelper = messageHelper; }
/// <exception cref="ArgumentNullException">commandsContainer is null</exception> public DecipherCommand(ICommandsContainer commandsContainer, IFilesView filesView, IRsaFactory rsaFactory, IEnvironmentHelper environmentHelper, IFormFactory formFactory, IMessageHelper messageHelper, IFileUnifier fileUnifier) { Checker.CheckNull(commandsContainer); this.commandsContainer = commandsContainer; this.filesView = filesView; this.rsaFactory = rsaFactory; this.environmentHelper = environmentHelper; this.formFactory = formFactory; this.messageHelper = messageHelper; this.fileUnifier = fileUnifier; }
/// <exception cref="ArgumentNullException">any argument is null</exception> public DecipherFormPresenter(IDecipherForm form, IRsaFactory rsaFactory, KeySerializer keySerializer, ICommandsContainer commandsContainer, FileSystemEntity initialFile, IEnvironmentHelper environmentHelper, IMessageHelper messageHelper, IFileUnifier fileUnifier) { Checker.CheckNull(form, rsaFactory, keySerializer, commandsContainer, initialFile); this.form = form; this.rsaFactory = rsaFactory; this.keySerializer = keySerializer; this.commandsContainer = commandsContainer; this.environmentHelper = environmentHelper; this.messageHelper = messageHelper; this.fileUnifier = fileUnifier; form.OutputDirectoryPath = GetOutputDirectoryPath(initialFile); form.Decipher += form_Decipher; form.CancelDecipher += form_CancelDecipher; form.OutputFileNameChanged += form_OutputFileNameChanged; form.PrivateKeyChanged += form_PrivateKeyChanged; }