Partager via


MultipartFileStreamProvider.GetStream Method

Gets the stream instance where the message body part is written to.

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

Syntax

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

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

Parameters

  • parent
    Type: HttpContent

    The content of 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 which FileStream to write the body part to.

See Also

Reference

MultipartFileStreamProvider Class

System.Net.Http Namespace