Editare

Partajați prin


StreamContent Constructors

Definition

Creates a new instance of the StreamContent class.

Overloads

StreamContent(Stream)

Creates a new instance of the StreamContent class.

StreamContent(Stream, Int32)

Creates a new instance of the StreamContent class.

StreamContent(Stream)

Source:
StreamContent.cs
Source:
StreamContent.cs
Source:
StreamContent.cs

Creates a new instance of the StreamContent class.

public:
 StreamContent(System::IO::Stream ^ content);
public StreamContent (System.IO.Stream content);
new System.Net.Http.StreamContent : System.IO.Stream -> System.Net.Http.StreamContent
Public Sub New (content As Stream)

Parameters

content
Stream

The content used to initialize the StreamContent.

Remarks

The StreamContent object calls Dispose() on the provided Stream object when StreamContent.Dispose is called.

Applies to

StreamContent(Stream, Int32)

Source:
StreamContent.cs
Source:
StreamContent.cs
Source:
StreamContent.cs

Creates a new instance of the StreamContent class.

public:
 StreamContent(System::IO::Stream ^ content, int bufferSize);
public StreamContent (System.IO.Stream content, int bufferSize);
new System.Net.Http.StreamContent : System.IO.Stream * int -> System.Net.Http.StreamContent
Public Sub New (content As Stream, bufferSize As Integer)

Parameters

content
Stream

The content used to initialize the StreamContent.

bufferSize
Int32

The size, in bytes, of the buffer for the StreamContent.

Exceptions

The content was null.

The bufferSize was less than or equal to zero.

Remarks

The StreamContent object calls Dispose() on the provided Stream object when StreamContent.Dispose is called.

Applies to