BufferedMediaTypeFormatter.ReadFromStreamAsync Method

Reads asynchronously from the buffered stream.

Namespace:  System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Syntax

'Declaration
Public Overrides NotOverridable Function ReadFromStreamAsync ( _
    type As Type, _
    readStream As Stream, _
    content As HttpContent, _
    formatterLogger As IFormatterLogger _
) As Task(Of Object)
'Usage
Dim instance As BufferedMediaTypeFormatter 
Dim type As Type 
Dim readStream As Stream 
Dim content As HttpContent 
Dim formatterLogger As IFormatterLogger 
Dim returnValue As Task(Of Object)

returnValue = instance.ReadFromStreamAsync(type, _
    readStream, content, formatterLogger)
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
abstract ReadFromStreamAsync : 
        type:Type * 
        readStream:Stream * 
        content:HttpContent * 
        formatterLogger:IFormatterLogger -> Task<Object> 
override ReadFromStreamAsync : 
        type:Type * 
        readStream:Stream * 
        content:HttpContent * 
        formatterLogger:IFormatterLogger -> Task<Object> 
public override final function ReadFromStreamAsync(
    type : Type, 
    readStream : Stream, 
    content : HttpContent, 
    formatterLogger : IFormatterLogger
) : Task<Object>

Parameters

  • type
    Type: System.Type

    The type of the object to deserialize.

  • content
    Type: HttpContent

    The HttpContent, if available. Can be null.

Return Value

Type: System.Threading.Tasks.Task<Object>
A task object representing the asynchronous operation.

Remarks

An implementation of this method should close stream upon completion.

See Also

Reference

BufferedMediaTypeFormatter Class

System.Net.Http.Formatting Namespace