Exemplo n.º 1
0
        public ChangeReceiverStrategy(IProtocolDialogServer dialogServer,
                                      IConfiguration configuration,
                                      HashAlgorithm hashAlgorithm,
                                      IFileSystem fileSystem)
        {
            if (hashAlgorithm == null)
            {
                throw new ArgumentNullException(nameof(hashAlgorithm));
            }
            if (dialogServer == null)
            {
                throw new ArgumentNullException(nameof(dialogServer));
            }
            if (fileSystem == null)
            {
                throw new ArgumentNullException(nameof(fileSystem));
            }
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            _hashAlgorithm   = hashAlgorithm;
            _dialog          = dialogServer;
            _fileSystem      = fileSystem;
            _configuration   = configuration;
            _outputDirectory = _configuration["output-directory"];
            _hashSize        = hashAlgorithm.HashSize / 8;
        }
Exemplo n.º 2
0
        public DeleteReceiverStrategy(IProtocolDialogServer dialog, IConfiguration configuration, IFileSystem fileSystem)
        {
            if (dialog == null)
            {
                throw new ArgumentNullException(nameof(dialog));
            }
            if (fileSystem == null)
            {
                throw new ArgumentNullException(nameof(fileSystem));
            }
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            _dialog        = dialog;
            _fileSystem    = fileSystem;
            _configuration = configuration;
        }
Exemplo n.º 3
0
        public CreateReceiverStrategy(IProtocolDialogServer dialog, IConfiguration configuration, HashAlgorithm hashAlgorithm, IFileSystem fileSystem) :
            base(dialog, configuration, hashAlgorithm, fileSystem)
        {
            if (dialog == null)
            {
                throw new ArgumentNullException(nameof(dialog));
            }
            if (fileSystem == null)
            {
                throw new ArgumentNullException(nameof(fileSystem));
            }
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            _dialog        = dialog;
            _fileSystem    = fileSystem;
            _configuration = configuration;
        }