Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpContentExtensions::ReadAsAsync Method

 

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync(HttpContent^, Type^)

Returns a Task that will yield an object of the specified type from the content instance.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync(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.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync(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.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync(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.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync(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.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync(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.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync<T>(HttpContent^)

Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync<T>(HttpContent^, CancellationToken)

Returns a Task that will yield an object of the specified type from the content instance.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^)

Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^, CancellationToken)

Returns a Task that will yield an object of the specified type from the content instance.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^)

Returns a Task that will yield an object of the specified type <typeparamref name="T" /> from the content instance.

System_CAPS_pubmethodSystem_CAPS_staticReadAsAsync<T>(HttpContent^, IEnumerable<MediaTypeFormatter^>^, IFormatterLogger^, CancellationToken)

Returns a Task that will yield an object of the specified type from the content instance.

Return to top

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.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<Object^>^

An object instance of the specified type.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<Object^>^

An object instance of the specified type.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<Object^>^

An object instance of the specified type.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<Object^>^

An object instance of the specified type.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<Object^>^

An object instance of the specified type.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<T>^

An object instance of the specified type.

Type Parameters

T

The type of the object to read.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<T>^

An object instance of the specified type.

Type Parameters

T

The type of the object to read.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<T>^

An object instance of the specified type.

Type Parameters

T

The type of the object to read.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<T>^

An object instance of the specified type.

Type Parameters

T

The type of the object to read.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<T>^

An object instance of the specified type.

Type Parameters

T

The type of the object to read.

Return to top

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.

Return Value

Type: System.Threading.Tasks::Task<T>^

An object instance of the specified type.

Type Parameters

T

The type of the object to read.

Return to top
Show: