JsonMediaTypeFormatter.WriteToStreamAsync Method

Writes an object of the specified type to the specified stream. This method is called during serialization.

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


Public Overrides Function WriteToStreamAsync ( _
    type As Type, _
    value As Object, _
    writeStream As Stream, _
    content As HttpContent, _
    transportContext As TransportContext _
) As Task
Dim instance As JsonMediaTypeFormatter 
Dim type As Type 
Dim value As Object 
Dim writeStream As Stream 
Dim content As HttpContent 
Dim transportContext As TransportContext 
Dim returnValue As Task 

returnValue = instance.WriteToStreamAsync(type, _
    value, writeStream, content, transportContext)
public override Task WriteToStreamAsync(
    Type type,
    Object value,
    Stream writeStream,
    HttpContent content,
    TransportContext transportContext
virtual Task^ WriteToStreamAsync(
    Type^ type, 
    Object^ value, 
    Stream^ writeStream, 
    HttpContent^ content, 
    TransportContext^ transportContext
) override
abstract WriteToStreamAsync : 
        type:Type * 
        value:Object * 
        writeStream:Stream * 
        content:HttpContent * 
        transportContext:TransportContext -> Task  
override WriteToStreamAsync : 
        type:Type * 
        value:Object * 
        writeStream:Stream * 
        content:HttpContent * 
        transportContext:TransportContext -> Task
public override function WriteToStreamAsync(
    type : Type, 
    value : Object, 
    writeStream : Stream, 
    content : HttpContent, 
    transportContext : TransportContext
) : Task


  • content
    Type: HttpContent

    The HttpContent where the content is being written.

Return Value

Type: System.Threading.Tasks.Task
A Task that will write the value to the stream.

See Also


JsonMediaTypeFormatter Class

System.Net.Http.Formatting Namespace