Freigeben über


BufferedMediaTypeFormatter.WriteToStream Method

Writes synchronously to the buffered stream.

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

Syntax

'Declaration
Public Overridable Sub WriteToStream ( _
    type As Type, _
    value As Object, _
    writeStream As Stream, _
    content As HttpContent _
)
'Usage
Dim instance As BufferedMediaTypeFormatter 
Dim type As Type 
Dim value As Object 
Dim writeStream As Stream 
Dim content As HttpContent

instance.WriteToStream(type, value, writeStream, _
    content)
public virtual void WriteToStream(
    Type type,
    Object value,
    Stream writeStream,
    HttpContent content
)
public:
virtual void WriteToStream(
    Type^ type, 
    Object^ value, 
    Stream^ writeStream, 
    HttpContent^ content
)
abstract WriteToStream : 
        type:Type * 
        value:Object * 
        writeStream:Stream * 
        content:HttpContent -> unit  
override WriteToStream : 
        type:Type * 
        value:Object * 
        writeStream:Stream * 
        content:HttpContent -> unit
public function WriteToStream(
    type : Type, 
    value : Object, 
    writeStream : Stream, 
    content : HttpContent
)

Parameters

  • type
    Type: System.Type

    The type of the object to serialize.

  • value
    Type: System.Object

    The object value to write. Can be null.

  • content
    Type: HttpContent

    The HttpContent, if available. Can be null.

Remarks

An implementation of this method should close stream upon completion.

See Also

Reference

BufferedMediaTypeFormatter Class

System.Net.Http.Formatting Namespace