internal static MultipartContentElement[] Parse(HttpRawUploadedContent data, int length, byte[] boundary, Encoding encoding)
        {
            HttpMultipartContentTemplateParser parser = new HttpMultipartContentTemplateParser(data, length, boundary, encoding);

            parser.ParseIntoElementList();
            return((MultipartContentElement[])parser._elements.ToArray(typeof(MultipartContentElement)));
        }
Exemplo n.º 2
0
        /*
         * Static method to do the parsing
         */
        internal static MultipartContentElement[] Parse(byte[] data, int length, byte[] boundary, Encoding encoding)
        {
            HttpMultipartContentTemplateParser parser = new HttpMultipartContentTemplateParser(data, length, boundary, encoding);

            parser.ParseIntoElementList();

            int n = parser._elements.Count;

            MultipartContentElement[] elements = new MultipartContentElement[n];

            for (int i = 0; i < n; i++)
            {
                elements[i] = (MultipartContentElement)parser._elements[i];
            }

            return(elements);
        }
 /*
  * Static method to do the parsing
  */
 internal static MultipartContentElement[] Parse(HttpRawUploadedContent data, int length, byte[] boundary, Encoding encoding) {
     HttpMultipartContentTemplateParser parser = new HttpMultipartContentTemplateParser(data, length, boundary, encoding);
     parser.ParseIntoElementList();
     return (MultipartContentElement[])parser._elements.ToArray(typeof(MultipartContentElement));
 }