Jaa


ODataMessageReader.DetectPayloadKind Method

Definition

Determines the potential payload kinds and formats of the payload being read and returns it.

public System.Collections.Generic.IEnumerable<Microsoft.OData.ODataPayloadKindDetectionResult> DetectPayloadKind ();
member this.DetectPayloadKind : unit -> seq<Microsoft.OData.ODataPayloadKindDetectionResult>
Public Function DetectPayloadKind () As IEnumerable(Of ODataPayloadKindDetectionResult)

Returns

The set of potential payload kinds and formats for the payload being read by this reader.

Remarks

When this method is called it first analyzes the content type and determines whether there are multiple matching payload kinds registered for the message's content type. If there are, it then runs the payload kind detection on all formats that have a matching payload kind registered. Note that this method can return multiple results if a payload is valid for multiple payload kinds but will always at most return a single result per payload kind.

Applies to