Share via


ODataFormat.DetectPayloadKindAsync Method

Definition

Asynchronously detects the payload kinds supported by this format for the specified message payload.

public abstract System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.OData.ODataPayloadKind>> DetectPayloadKindAsync (Microsoft.OData.ODataMessageInfo messageInfo, Microsoft.OData.ODataMessageReaderSettings settings);
abstract member DetectPayloadKindAsync : Microsoft.OData.ODataMessageInfo * Microsoft.OData.ODataMessageReaderSettings -> System.Threading.Tasks.Task<seq<Microsoft.OData.ODataPayloadKind>>
Public MustOverride Function DetectPayloadKindAsync (messageInfo As ODataMessageInfo, settings As ODataMessageReaderSettings) As Task(Of IEnumerable(Of ODataPayloadKind))

Parameters

messageInfo
ODataMessageInfo

The context information for the message.

settings
ODataMessageReaderSettings

Configuration settings of the OData reader.

Returns

A task that when completed returns the set of ODataPayloadKinds that are supported with the specified payload.

Remarks

The stream returned by GetMessageStream of messageInfo could be used for reading for payload kind detection. Reading this stream won't affect later reading operations of payload processing.

Applies to