BufferedMediaTypeFormatter.WriteToStream Method

 

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

Overload List

Name Description
System_CAPS_pubmethod WriteToStream(Type, Object, Stream, HttpContent)

Writes synchronously to the buffered stream.

System_CAPS_pubmethod WriteToStream(Type, Object, Stream, HttpContent, CancellationToken)

Writes synchronously to the buffered stream.

See Also

BufferedMediaTypeFormatter Class
System.Net.Http.Formatting Namespace

Return to top

BufferedMediaTypeFormatter.WriteToStream Method (Type, Object, Stream, HttpContent)

Writes synchronously to the buffered stream.

Syntax

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 Overridable Sub WriteToStream (
    type As Type,
    value As Object,
    writeStream As Stream,
    content As 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.

Return to top

BufferedMediaTypeFormatter.WriteToStream Method (Type, Object, Stream, HttpContent, CancellationToken)

Writes synchronously to the buffered stream.

Syntax

public virtual void WriteToStream(
    Type type,
    object value,
    Stream writeStream,
    HttpContent content,
    CancellationToken cancellationToken
)
public:
virtual void WriteToStream(
    Type^ type,
    Object^ value,
    Stream^ writeStream,
    HttpContent^ content,
    CancellationToken cancellationToken
)
abstract WriteToStream : 
        type:Type *
        value:Object *
        writeStream:Stream *
        content:HttpContent *
        cancellationToken:CancellationToken -> unit
override WriteToStream : 
        type:Type *
        value:Object *
        writeStream:Stream *
        content:HttpContent *
        cancellationToken:CancellationToken -> unit
Public Overridable Sub WriteToStream (
    type As Type,
    value As Object,
    writeStream As Stream,
    content As HttpContent,
    cancellationToken As CancellationToken
)

Parameters

  • type
    Type: System.Type

    The type of the object to serialize.

  • value
    Type: System.Object

    The object value to write. Can be null.

Return to top