BufferedMediaTypeFormatter.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) | Writes asynchronously to the buffered stream.(Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext).) |
|
WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken) | Writes asynchronously to the buffered stream.(Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext, CancellationToken).) |
See Also
BufferedMediaTypeFormatter Class
System.Net.Http.Formatting Namespace
Return to top
BufferedMediaTypeFormatter.WriteToStreamAsync Method (Type, Object, Stream, HttpContent, TransportContext)
Writes asynchronously to the buffered stream.
Syntax
public override sealed Task WriteToStreamAsync(
Type type,
object value,
Stream writeStream,
HttpContent content,
TransportContext transportContext
)
public:
virtual Task^ WriteToStreamAsync(
Type^ type,
Object^ value,
Stream^ writeStream,
HttpContent^ content,
TransportContext^ transportContext
) override sealed
override WriteToStreamAsync :
type:Type *
value:Object *
writeStream:Stream *
content:HttpContent *
transportContext:TransportContext -> Task
Public Overrides NotOverridable Function WriteToStreamAsync (
type As Type,
value As Object,
writeStream As Stream,
content As HttpContent,
transportContext As TransportContext
) As Task
Parameters
type
Type: System.TypeThe type of the object to serialize.
value
Type: System.ObjectThe object value to write. It may be null.
writeStream
Type: System.IO.StreamThe stream to which to write.
content
Type: System.Net.Http.HttpContentThe HttpContent, if available. Can be null.
transportContext
Type: System.Net.TransportContextThe transport context.
Return Value
Type: System.Threading.Tasks.Task
A task object representing the asynchronous operation.
Return to top
BufferedMediaTypeFormatter.WriteToStreamAsync Method (Type, Object, Stream, HttpContent, TransportContext, CancellationToken)
Writes asynchronously to the buffered stream.
Syntax
public override sealed 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 sealed
override WriteToStreamAsync :
type:Type *
value:Object *
writeStream:Stream *
content:HttpContent *
transportContext:TransportContext *
cancellationToken:CancellationToken -> Task
Public Overrides NotOverridable 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 the object to serialize.
value
Type: System.ObjectThe object value to write. It may be null.
writeStream
Type: System.IO.StreamThe stream to which to write.
content
Type: System.Net.Http.HttpContentThe HttpContent, if available. Can be null.
transportContext
Type: System.Net.TransportContextThe transport context.
cancellationToken
Type: System.Threading.CancellationTokenThe token to cancel the operation.
Return Value
Type: System.Threading.Tasks.Task
A task object representing the asynchronous operation.
Return to top