/// <summary> /// Asynchronously 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 Task <MultipartFormDataParser> ParseAsync(Stream stream, Encoding encoding, int binaryBufferSize) { return(MultipartFormDataParser.ParseAsync(stream, null, encoding, binaryBufferSize)); }
/// <summary> /// Asynchronously parse the stream into a new instance of the <see cref="MultipartFormDataParser" /> class. /// Boundary will be automatically detected based on the first line of input. /// </summary> /// <param name="stream"> /// The stream containing the multipart data. /// </param> /// <returns> /// A new instance of the <see cref="MultipartFormDataParser"/> class. /// </returns> public static Task <MultipartFormDataParser> ParseAsync(Stream stream) { return(MultipartFormDataParser.ParseAsync(stream, null, Encoding.UTF8, DefaultBufferSize)); }
/// <summary> /// Asynchronously 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 Task <MultipartFormDataParser> ParseAsync(Stream stream, string boundary, Encoding encoding) { return(MultipartFormDataParser.ParseAsync(stream, boundary, encoding, DefaultBufferSize)); }
/// <summary> /// Asynchronously 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 Task <MultipartFormDataParser> ParseAsync(Stream stream, Encoding encoding) { return(MultipartFormDataParser.ParseAsync(stream, null, encoding, DefaultBufferSize, null)); }