MultipartStreamProvider.GetStream Method

Gets the stream where to write the body part to. This method is called when a MIME multipart body part has been parsed.

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Syntax

'Declaration
Public MustOverride Function GetStream ( _
    parent As HttpContent, _
    headers As HttpContentHeaders _
) As Stream
'Usage
Dim instance As MultipartStreamProvider 
Dim parent As HttpContent 
Dim headers As HttpContentHeaders 
Dim returnValue As Stream 

returnValue = instance.GetStream(parent, _
    headers)
public abstract Stream GetStream(
    HttpContent parent,
    HttpContentHeaders headers
)
public:
virtual Stream^ GetStream(
    HttpContent^ parent, 
    HttpContentHeaders^ headers
) abstract
abstract GetStream : 
        parent:HttpContent * 
        headers:HttpContentHeaders -> Stream
public abstract function GetStream(
    parent : HttpContent, 
    headers : HttpContentHeaders
) : Stream

Parameters

  • parent
    Type: HttpContent

    The content of the HTTP.

  • headers
    Type: HttpContentHeaders

    The header fields describing the body part.

Return Value

Type: System.IO.Stream
The Stream instance where the message body part is written to.

Remarks

This body part stream provider examines the headers provided by the MIME multipart parser and decides whether it should return a file stream or a memory stream for the body part to be written to.

See Also

Reference

MultipartStreamProvider Class

System.Net.Http Namespace