BufferedMediaTypeFormatter.WriteToStream Method
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
WriteToStream(Type, Object, Stream, HttpContent) | Writes synchronously to the buffered stream. |
|
WriteToStream(Type, Object, Stream, HttpContent, CancellationToken) | Writes synchronously to the buffered stream. |
See Also
BufferedMediaTypeFormatter Class
System.Net.Http.Formatting Namespace
Return to top
BufferedMediaTypeFormatter.WriteToStream Method (Type, Object, Stream, HttpContent)
Writes synchronously to the buffered stream.
Syntax
public virtual void WriteToStream(
Type type,
object value,
Stream writeStream,
HttpContent content
)
public:
virtual void WriteToStream(
Type^ type,
Object^ value,
Stream^ writeStream,
HttpContent^ content
)
abstract WriteToStream :
type:Type *
value:Object *
writeStream:Stream *
content:HttpContent -> unit
override WriteToStream :
type:Type *
value:Object *
writeStream:Stream *
content:HttpContent -> unit
Public Overridable Sub WriteToStream (
type As Type,
value As Object,
writeStream As Stream,
content As HttpContent
)
Parameters
type
Type: System.TypeThe type of the object to serialize.
value
Type: System.ObjectThe object value to write. Can be null.
writeStream
Type: System.IO.StreamThe stream to which to write.
content
Type: System.Net.Http.HttpContentThe HttpContent, if available. Can be null.
Return to top
BufferedMediaTypeFormatter.WriteToStream Method (Type, Object, Stream, HttpContent, CancellationToken)
Writes synchronously to the buffered stream.
Syntax
public virtual void WriteToStream(
Type type,
object value,
Stream writeStream,
HttpContent content,
CancellationToken cancellationToken
)
public:
virtual void WriteToStream(
Type^ type,
Object^ value,
Stream^ writeStream,
HttpContent^ content,
CancellationToken cancellationToken
)
abstract WriteToStream :
type:Type *
value:Object *
writeStream:Stream *
content:HttpContent *
cancellationToken:CancellationToken -> unit
override WriteToStream :
type:Type *
value:Object *
writeStream:Stream *
content:HttpContent *
cancellationToken:CancellationToken -> unit
Public Overridable Sub WriteToStream (
type As Type,
value As Object,
writeStream As Stream,
content As HttpContent,
cancellationToken As CancellationToken
)
Parameters
type
Type: System.TypeThe type of the object to serialize.
value
Type: System.ObjectThe object value to write. Can be null.
writeStream
Type: System.IO.StreamThe stream to which to write.
content
Type: System.Net.Http.HttpContentThe HttpContent, if available. Can be null.
cancellationToken
Type: System.Threading.CancellationTokenThe token to cancel the operation.
Return to top