HttpServer.HttpForm.AddFile C# (CSharp) Method

AddFile() public method

Adds a file to the collection of posted files
If the file is already added If file is null If the instance is HttpForm.EmptyForm which cannot be modified
public AddFile ( HttpServer.HttpFile file ) : void
file HttpServer.HttpFile The file to add
return void
        public void AddFile(HttpFile file)
        {
            if (_ignoreChanges)
                throw new InvalidOperationException("Cannot add files to instance HttpForm.EmptyForm.");
            if(file == null)
                throw new ArgumentNullException("file");

            if(_files.ContainsKey(file.Name))
                throw new ArgumentException("File named '" + file.Name + "' already exists!");

            _files.Add(file.Name, file);
        }