HttpContentExtensions::ReadAsAsync Method
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | ReadAsAsync(HttpContent^, Type^) | Returns a Task that will yield an object of the specified type from the content instance. |
![]() ![]() | ReadAsAsync(HttpContent^, Type^, CancellationToken) | Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. |
![]() ![]() | ReadAsAsync(HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^) | Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. |
![]() ![]() | ReadAsAsync(HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^, CancellationToken) | Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. |
![]() ![]() | ReadAsAsync(HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^) | Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. |
![]() ![]() | ReadAsAsync(HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^, CancellationToken) | Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content. |
![]() ![]() | ReadAsAsync<T>(HttpContent^) | Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. |
![]() ![]() | ReadAsAsync<T>(HttpContent^, CancellationToken) | Returns a Task that will yield an object of the specified type from the content instance. |
![]() ![]() | ReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^) | Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. |
![]() ![]() | ReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^, CancellationToken) | Returns a Task that will yield an object of the specified type from the content instance. |
![]() ![]() | ReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^) | Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance. |
![]() ![]() | ReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^, CancellationToken) | Returns a Task that will yield an object of the specified type from the content instance. |
HttpContentExtensions::ReadAsAsync Method (HttpContent^, Type^)
Returns a Task that will yield an object of the specified type from the content instance.
public: [ExtensionAttribute] static Task<Object^>^ ReadAsAsync( HttpContent^ content, Type^ type )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- type
-
Type:
System::Type^
The type of the object to read.
Return Value
Type: System.Threading.Tasks::Task<Object^>^A Task that will yield an object instance of the specified type.
HttpContentExtensions::ReadAsAsync Method (HttpContent^, Type^, CancellationToken)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public: [ExtensionAttribute] static Task<Object^>^ ReadAsAsync( HttpContent^ content, Type^ type, CancellationToken cancellationToken )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- type
-
Type:
System::Type^
The type of the object to read.
- cancellationToken
-
Type:
System.Threading::CancellationToken
The token to cancel the operation.
HttpContentExtensions::ReadAsAsync Method (HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public: [ExtensionAttribute] static Task<Object^>^ ReadAsAsync( HttpContent^ content, Type^ type, IEnumerable<MediaTypeFormatter^>^ formatters )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- type
-
Type:
System::Type^
The type of the object to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTypeFormatter instances to use.
HttpContentExtensions::ReadAsAsync Method (HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^, CancellationToken)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public: [ExtensionAttribute] static Task<Object^>^ ReadAsAsync( HttpContent^ content, Type^ type, IEnumerable<MediaTypeFormatter^>^ formatters, CancellationToken cancellationToken )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- type
-
Type:
System::Type^
The type of the object to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTypeFormatter instances to use.
- cancellationToken
-
Type:
System.Threading::CancellationToken
The token to cancel the operation.
HttpContentExtensions::ReadAsAsync Method (HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public: [ExtensionAttribute] static Task<Object^>^ ReadAsAsync( HttpContent^ content, Type^ type, IEnumerable<MediaTypeFormatter^>^ formatters, IFormatterLogger^ formatterLogger )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- type
-
Type:
System::Type^
The type of the object to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTypeFormatter instances to use.
- formatterLogger
-
Type:
System.Net.Http.Formatting::IFormatterLogger^
The IFormatterLogger to log events to.
HttpContentExtensions::ReadAsAsync Method (HttpContent^, Type^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^, CancellationToken)
Returns a Task that will yield an object of the specified type from the content instance using one of the provided formatters to deserialize the content.
public: [ExtensionAttribute] static Task<Object^>^ ReadAsAsync( HttpContent^ content, Type^ type, IEnumerable<MediaTypeFormatter^>^ formatters, IFormatterLogger^ formatterLogger, CancellationToken cancellationToken )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- type
-
Type:
System::Type^
The type of the object to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTypeFormatter instances to use.
- formatterLogger
-
Type:
System.Net.Http.Formatting::IFormatterLogger^
The IFormatterLogger to log events to.
- cancellationToken
-
Type:
System.Threading::CancellationToken
The token to cancel the operation.
HttpContentExtensions::ReadAsAsync<T> Method (HttpContent^)
Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.
public: generic<typename T> [ExtensionAttribute] static Task<T>^ ReadAsAsync( HttpContent^ content )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
Type Parameters
- T
The type of the object to read.
HttpContentExtensions::ReadAsAsync<T> Method (HttpContent^, CancellationToken)
Returns a Task that will yield an object of the specified type from the content instance.
public: generic<typename T> [ExtensionAttribute] static Task<T>^ ReadAsAsync( HttpContent^ content, CancellationToken cancellationToken )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- cancellationToken
-
Type:
System.Threading::CancellationToken
The token to cancel the operation.
Type Parameters
- T
The type of the object to read.
HttpContentExtensions::ReadAsAsync<T> Method (HttpContent^, IEnumerable<MediaTypeFormatter^>^)
Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.
public: generic<typename T> [ExtensionAttribute] static Task<T>^ ReadAsAsync( HttpContent^ content, IEnumerable<MediaTypeFormatter^>^ formatters )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTyepFormatter instances to use.
Type Parameters
- T
The type of the object to read.
HttpContentExtensions::ReadAsAsync<T> Method (HttpContent^, IEnumerable<MediaTypeFormatter^>^, CancellationToken)
Returns a Task that will yield an object of the specified type from the content instance.
public: generic<typename T> [ExtensionAttribute] static Task<T>^ ReadAsAsync( HttpContent^ content, IEnumerable<MediaTypeFormatter^>^ formatters, CancellationToken cancellationToken )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTypeFormatter instances to use.
- cancellationToken
-
Type:
System.Threading::CancellationToken
The token to cancel the operation.
Type Parameters
- T
The type of the object to read.
HttpContentExtensions::ReadAsAsync<T> Method (HttpContent^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^)
Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.
public: generic<typename T> [ExtensionAttribute] static Task<T>^ ReadAsAsync( HttpContent^ content, IEnumerable<MediaTypeFormatter^>^ formatters, IFormatterLogger^ formatterLogger )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTypeFormatter instances to use.
- formatterLogger
-
Type:
System.Net.Http.Formatting::IFormatterLogger^
The IFormatterLogger to log events to.
Type Parameters
- T
The type of the object to read.
HttpContentExtensions::ReadAsAsync<T> Method (HttpContent^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^, CancellationToken)
Returns a Task that will yield an object of the specified type from the content instance.
public: generic<typename T> [ExtensionAttribute] static Task<T>^ ReadAsAsync( HttpContent^ content, IEnumerable<MediaTypeFormatter^>^ formatters, IFormatterLogger^ formatterLogger, CancellationToken cancellationToken )
Parameters
- content
-
Type:
System.Net.Http::HttpContent^
The HttpContent instance from which to read.
- formatters
-
Type:
System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^
The collection of MediaTypeFormatter instances to use.
- formatterLogger
-
Type:
System.Net.Http.Formatting::IFormatterLogger^
The IFormatterLogger to log events to.
- cancellationToken
-
Type:
System.Threading::CancellationToken
The token to cancel the operation.
Type Parameters
- T
The type of the object to read.

