BufferedMediaTypeFormatter.ReadFromStreamAsync Method
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Overload List
Name | Description | |
---|---|---|
ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger) | Reads asynchronously from the buffered stream.(Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger).) |
|
ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger, CancellationToken) | Reads asynchronously from the buffered stream.(Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger, CancellationToken).) |
See Also
BufferedMediaTypeFormatter Class
System.Net.Http.Formatting Namespace
Return to top
BufferedMediaTypeFormatter.ReadFromStreamAsync Method (Type, Stream, HttpContent, IFormatterLogger)
Reads asynchronously from the buffered stream.
Syntax
public override sealed Task<object> ReadFromStreamAsync(
Type type,
Stream readStream,
HttpContent content,
IFormatterLogger formatterLogger
)
public:
virtual Task<Object^>^ ReadFromStreamAsync(
Type^ type,
Stream^ readStream,
HttpContent^ content,
IFormatterLogger^ formatterLogger
) override sealed
override ReadFromStreamAsync :
type:Type *
readStream:Stream *
content:HttpContent *
formatterLogger:IFormatterLogger -> Task<Object>
Public Overrides NotOverridable Function ReadFromStreamAsync (
type As Type,
readStream As Stream,
content As HttpContent,
formatterLogger As IFormatterLogger
) As Task(Of 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.Threading.Tasks.Task<Object>
A task object representing the asynchronous operation.
Return to top
BufferedMediaTypeFormatter.ReadFromStreamAsync Method (Type, Stream, HttpContent, IFormatterLogger, CancellationToken)
Reads asynchronously from the buffered stream.
Syntax
public override sealed Task<object> ReadFromStreamAsync(
Type type,
Stream readStream,
HttpContent content,
IFormatterLogger formatterLogger,
CancellationToken cancellationToken
)
public:
virtual Task<Object^>^ ReadFromStreamAsync(
Type^ type,
Stream^ readStream,
HttpContent^ content,
IFormatterLogger^ formatterLogger,
CancellationToken cancellationToken
) override sealed
override ReadFromStreamAsync :
type:Type *
readStream:Stream *
content:HttpContent *
formatterLogger:IFormatterLogger *
cancellationToken:CancellationToken -> Task<Object>
Public Overrides NotOverridable Function ReadFromStreamAsync (
type As Type,
readStream As Stream,
content As HttpContent,
formatterLogger As IFormatterLogger,
cancellationToken As CancellationToken
) As Task(Of 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.Threading.Tasks.Task<Object>
A task object representing the asynchronous operation.
Return to top