BufferedMediaTypeFormatter.ReadFromStream Method
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
ReadFromStream(Type, Stream, HttpContent, IFormatterLogger) | Reads synchronously from the buffered stream. |
|
ReadFromStream(Type, Stream, HttpContent, IFormatterLogger, CancellationToken) | Reads synchronously from the buffered stream. |
See Also
BufferedMediaTypeFormatter Class
System.Net.Http.Formatting Namespace
Return to top
BufferedMediaTypeFormatter.ReadFromStream Method (Type, Stream, HttpContent, IFormatterLogger)
Reads synchronously from the buffered stream.
Syntax
public virtual object ReadFromStream(
Type type,
Stream readStream,
HttpContent content,
IFormatterLogger formatterLogger
)
public:
virtual Object^ ReadFromStream(
Type^ type,
Stream^ readStream,
HttpContent^ content,
IFormatterLogger^ formatterLogger
)
abstract ReadFromStream :
type:Type *
readStream:Stream *
content:HttpContent *
formatterLogger:IFormatterLogger -> Object
override ReadFromStream :
type:Type *
readStream:Stream *
content:HttpContent *
formatterLogger:IFormatterLogger -> Object
Public Overridable Function ReadFromStream (
type As Type,
readStream As Stream,
content As HttpContent,
formatterLogger As IFormatterLogger
) As Object
Parameters
type
Type: System.TypeThe type of the object to deserialize.
readStream
Type: System.IO.StreamThe stream from which to read.
content
Type: System.Net.Http.HttpContentThe HttpContent, if available. Can be null.
formatterLogger
Type: System.Net.Http.Formatting.IFormatterLoggerThe IFormatterLogger to log events to.
Return Value
Type: System.Object
An object of the given type.
Return to top
BufferedMediaTypeFormatter.ReadFromStream Method (Type, Stream, HttpContent, IFormatterLogger, CancellationToken)
Reads synchronously from the buffered stream.
Syntax
public virtual object ReadFromStream(
Type type,
Stream readStream,
HttpContent content,
IFormatterLogger formatterLogger,
CancellationToken cancellationToken
)
public:
virtual Object^ ReadFromStream(
Type^ type,
Stream^ readStream,
HttpContent^ content,
IFormatterLogger^ formatterLogger,
CancellationToken cancellationToken
)
abstract ReadFromStream :
type:Type *
readStream:Stream *
content:HttpContent *
formatterLogger:IFormatterLogger *
cancellationToken:CancellationToken -> Object
override ReadFromStream :
type:Type *
readStream:Stream *
content:HttpContent *
formatterLogger:IFormatterLogger *
cancellationToken:CancellationToken -> Object
Public Overridable Function ReadFromStream (
type As Type,
readStream As Stream,
content As HttpContent,
formatterLogger As IFormatterLogger,
cancellationToken As CancellationToken
) As Object
Parameters
type
Type: System.TypeThe type of the object to deserialize.
readStream
Type: System.IO.StreamThe stream from which to read.
content
Type: System.Net.Http.HttpContentThe HttpContent, if available. Can be null.
formatterLogger
Type: System.Net.Http.Formatting.IFormatterLoggerThe IFormatterLogger to log events to.
cancellationToken
Type: System.Threading.CancellationTokenThe token to cancel the operation.
Return Value
Type: System.Object
An object of the given type.
Return to top