XmlMediaTypeFormatter.WriteToStreamAsync Method
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext) | Asynchronously writes an object of the specified type.(Inherited from MediaTypeFormatter.) |
|
WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken) | Called during serialization to write an object of the specified type to the specified writeStream.(Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken).) |
See Also
XmlMediaTypeFormatter Class
System.Net.Http.Formatting Namespace
Return to top
XmlMediaTypeFormatter.WriteToStreamAsync Method (Type, Object, Stream, HttpContent, TransportContext, CancellationToken)
Called during serialization to write an object of the specified type to the specified writeStream.
Syntax
public override Task WriteToStreamAsync(
Type type,
object value,
Stream writeStream,
HttpContent content,
TransportContext transportContext,
CancellationToken cancellationToken
)
public:
virtual Task^ WriteToStreamAsync(
Type^ type,
Object^ value,
Stream^ writeStream,
HttpContent^ content,
TransportContext^ transportContext,
CancellationToken cancellationToken
) override
override WriteToStreamAsync :
type:Type *
value:Object *
writeStream:Stream *
content:HttpContent *
transportContext:TransportContext *
cancellationToken:CancellationToken -> Task
Public Overrides Function WriteToStreamAsync (
type As Type,
value As Object,
writeStream As Stream,
content As HttpContent,
transportContext As TransportContext,
cancellationToken As CancellationToken
) As Task
Parameters
type
Type: System.TypeThe type of object to write.
value
Type: System.ObjectThe object to write.
writeStream
Type: System.IO.StreamThe Stream to which to write.
content
Type: System.Net.Http.HttpContentThe HttpContent for the content being written.
transportContext
Type: System.Net.TransportContextThe TransportContext.
cancellationToken
Type: System.Threading.CancellationTokenThe token to monitor cancellation.
Return Value
Type: System.Threading.Tasks.Task
A Task that will write the value to the stream.
Return to top