ODataHttpContentExtensions.GetODataMessageReaderAsync Method (HttpContent, ODataMessageReaderSettings, CancellationToken)

Gets the ODataMessageReader for the HttpContent stream.

Namespace:  System.Web.Http.OData.Batch
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

[DebuggerStepThroughAttribute]
public static Task<ODataMessageReader> GetODataMessageReaderAsync(
	this HttpContent content,
	ODataMessageReaderSettings settings,
	CancellationToken cancellationToken
)

Parameters

content
Type: HttpContent
The HttpContent.
settings
Type: ODataMessageReaderSettings
The ODataMessageReaderSettings.
cancellationToken
Type: System.Threading.CancellationToken
The token to monitor for cancellation requests.

Return Value

Type: System.Threading.Tasks.Task<ODataMessageReader>
A task object that produces an ODataMessageReader when completed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpContent. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936 or https://msdn.microsoft.com/en-us/library/bb383977.
Show: