XmlMediaTypeFormatter.OnWriteToStreamAsync Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Called during serialization to write an object of the specified type to the specified stream.

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

Syntax

'Declaration
Protected Overrides Function OnWriteToStreamAsync ( _
    type As Type, _
    value As Object, _
    stream As Stream, _
    contentHeaders As HttpContentHeaders, _
    formatterContext As FormatterContext, _
    transportContext As TransportContext _
) As Task
protected override Task OnWriteToStreamAsync(
    Type type,
    Object value,
    Stream stream,
    HttpContentHeaders contentHeaders,
    FormatterContext formatterContext,
    TransportContext transportContext
)
protected:
virtual Task^ OnWriteToStreamAsync(
    Type^ type, 
    Object^ value, 
    Stream^ stream, 
    HttpContentHeaders^ contentHeaders, 
    FormatterContext^ formatterContext, 
    TransportContext^ transportContext
) override
abstract OnWriteToStreamAsync : 
        type:Type * 
        value:Object * 
        stream:Stream * 
        contentHeaders:HttpContentHeaders * 
        formatterContext:FormatterContext * 
        transportContext:TransportContext -> Task 
override OnWriteToStreamAsync : 
        type:Type * 
        value:Object * 
        stream:Stream * 
        contentHeaders:HttpContentHeaders * 
        formatterContext:FormatterContext * 
        transportContext:TransportContext -> Task 
protected override function OnWriteToStreamAsync(
    type : Type, 
    value : Object, 
    stream : Stream, 
    contentHeaders : HttpContentHeaders, 
    formatterContext : FormatterContext, 
    transportContext : TransportContext
) : Task

Parameters

Return Value

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

.NET Framework Security

See Also

Reference

XmlMediaTypeFormatter Class

System.Net.Http.Formatting Namespace