MediaTypeFormatterCollection.FindReader Method (Type, MediaTypeHeaderValue)

 

Helper to search a collection for a formatter that can read the .NET type in the given mediaType.

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

Syntax

public MediaTypeFormatter FindReader(
    Type type,
    MediaTypeHeaderValue mediaType
)
public:
MediaTypeFormatter^ FindReader(
    Type^ type,
    MediaTypeHeaderValue^ mediaType
)
member FindReader : 
        type:Type *
        mediaType:MediaTypeHeaderValue -> MediaTypeFormatter
Public Function FindReader (
    type As Type,
    mediaType As MediaTypeHeaderValue
) As MediaTypeFormatter

Parameters

Return Value

Type: System.Net.Http.Formatting.MediaTypeFormatter

The formatter that can read the type. Null if no formatter found.

See Also

MediaTypeFormatterCollection Class
System.Net.Http.Formatting Namespace

Return to top