/// <summary> /// Parse the stream into a new instance of the <see cref="MultipartFormDataParser" /> class /// with the input encoding and buffer size. Boundary is automatically detected. /// </summary> /// <param name="stream"> /// The stream containing the multipart data. /// </param> /// <param name="encoding"> /// The encoding of the multipart data. /// </param> /// <param name="binaryBufferSize"> /// The size of the buffer to use for parsing the multipart form data. This must be larger /// then (size of boundary + 4 + # bytes in newline). /// </param> /// <returns> /// A new instance of the <see cref="MultipartFormDataParser"/> class. /// </returns> public static MultipartFormDataParser Parse(Stream stream, Encoding encoding, int binaryBufferSize) { return(MultipartFormDataParser.Parse(stream, null, encoding, binaryBufferSize)); }
/// <summary> /// Parse the stream into a new instance of the <see cref="MultipartFormDataParser" /> class /// with the stream encoding. Boundary is automatically detected. /// </summary> /// <param name="stream"> /// The stream containing the multipart data. /// </param> /// <param name="encoding"> /// The encoding of the multipart data. /// </param> /// <returns> /// A new instance of the <see cref="MultipartFormDataParser"/> class. /// </returns> public static MultipartFormDataParser Parse(Stream stream, Encoding encoding) { return(MultipartFormDataParser.Parse(stream, null, encoding, DefaultBufferSize)); }
/// <summary> /// Parse the stream into a new instance of the <see cref="MultipartFormDataParser" /> class /// with the boundary and stream encoding. /// </summary> /// <param name="stream"> /// The stream containing the multipart data. /// </param> /// <param name="boundary"> /// The multipart/form-data boundary. This should be the value /// returned by the request header. /// </param> /// <param name="encoding"> /// The encoding of the multipart data. /// </param> /// <returns> /// A new instance of the <see cref="MultipartFormDataParser"/> class. /// </returns> public static MultipartFormDataParser Parse(Stream stream, string boundary, Encoding encoding) { return(MultipartFormDataParser.Parse(stream, boundary, encoding, DefaultBufferSize)); }
/// <summary> /// Parse the stream into a new instance of the <see cref="MultipartFormDataParser" /> class /// with the boundary. /// </summary> /// <param name="stream"> /// The stream containing the multipart data. /// </param> /// <param name="boundary"> /// The multipart/form-data boundary. This should be the value /// returned by the request header. /// </param> /// <returns> /// A new instance of the <see cref="MultipartFormDataParser"/> class. /// </returns> public static MultipartFormDataParser Parse(Stream stream, string boundary) { return(MultipartFormDataParser.Parse(stream, boundary, Encoding.UTF8, DefaultBufferSize, null)); }