ODataMessageReader.DetectPayloadKindAsync Method ()

 

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

Namespace:   Microsoft.OData.Core
Assembly:  Microsoft.OData.Core (in Microsoft.OData.Core.dll)

Syntax

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", 
    Justification = "Need to a return a task of an enumerable.")]
public Task<IEnumerable<ODataPayloadKindDetectionResult>> DetectPayloadKindAsync()
public:
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", 
    Justification = "Need to a return a task of an enumerable.")]
Task<IEnumerable<ODataPayloadKindDetectionResult^>^>^ DetectPayloadKindAsync()
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures",
    Justification = "Need to a return a task of an enumerable.")>]
member DetectPayloadKindAsync : unit -> Task<IEnumerable<ODataPayloadKindDetectionResult>>
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures",
    Justification := "Need to a return a task of an enumerable.")>
Public Function DetectPayloadKindAsync As Task(Of IEnumerable(Of ODataPayloadKindDetectionResult))

Return Value

Type: System.Threading.Tasks.Task<IEnumerable<ODataPayloadKindDetectionResult>>

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.

See Also

ODataMessageReader Class
Microsoft.OData.Core Namespace

Return to top