XmlMediaTypeFormatter.WriteToStreamAsync Method

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

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

public override Task WriteToStreamAsync(
	Type type,
	Object value,
	Stream writeStream,
	HttpContent content,
	TransportContext transportContext
)

Parameters

type
Type: System.Type

The type of object to write.

value
Type: System.Object

The object to write.

writeStream
Type: System.IO.Stream

The Stream to which to write.

content
Type: HttpContent

The HttpContent for the content being written.

transportContext
Type: System.Net.TransportContext

The TransportContext.

Return Value

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