Beispiel #1
0
        public FileHandler(
            ISavingFiles saver,
            IDeletingFiles deleter,
            IResizingImages resizer,
            ICreatingNameFiles fileNameCreator,
            IConfiguration configuration)
        {
            if (saver == null)
            {
                throw new ArgumentNullException("saver");
            }
            if (deleter == null)
            {
                throw new ArgumentNullException("deleter");
            }
            if (resizer == null)
            {
                throw new ArgumentNullException("resizer");
            }
            if (fileNameCreator == null)
            {
                throw new ArgumentNullException("fileNameCreator");
            }
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            _saver           = saver;
            _deleter         = deleter;
            _resizer         = resizer;
            _fileNameCreator = fileNameCreator;
            _configuration   = configuration;
        }
Beispiel #2
0
        public FileHandler(
            ISavingFiles saver,
            IDeletingFiles deleter,
            IResizingImages resizer,
            ICreatingNameFiles fileNameCreator,
            IConfiguration configuration)
        {
            if (saver == null)
                throw new ArgumentNullException(nameof(saver));
            if (deleter == null)
                throw new ArgumentNullException(nameof(deleter));
            if (resizer == null)
                throw new ArgumentNullException(nameof(resizer));
            if (fileNameCreator == null)
                throw new ArgumentNullException(nameof(fileNameCreator));
            if (configuration == null)
                throw new ArgumentNullException(nameof(configuration));

            _saver = saver;
            _deleter = deleter;
            _resizer = resizer;
            _fileNameCreator = fileNameCreator;
            _configuration = configuration;
        }