예제 #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="FormMultipartSection"/> class
 /// </summary>
 /// <param name="section">The section from which to create the <see cref="FormMultipartSection"/></param>
 /// <param name="header">An already parsed content disposition header</param>
 public FormMultipartSection(MultipartSection section, ContentDispositionHeaderValue header)
 {
     if (header == null || !header.IsFormDisposition())
     {
         throw new ArgumentException($"Argument must be a form section", nameof(section));
     }
     Section = section;
     _contentDispositionHeader = header;
     Name = HeaderUtilities.RemoveQuotes(_contentDispositionHeader.Name).ToString();
 }