MediaTypeFormatterCollection.FindWriter Method (Type, MediaTypeHeaderValue)

 

Helper to search a collection for a formatter that can write 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 FindWriter(
    Type type,
    MediaTypeHeaderValue mediaType
)
public:
MediaTypeFormatter^ FindWriter(
    Type^ type,
    MediaTypeHeaderValue^ mediaType
)
member FindWriter : 
        type:Type *
        mediaType:MediaTypeHeaderValue -> MediaTypeFormatter
Public Function FindWriter (
    type As Type,
    mediaType As MediaTypeHeaderValue
) As MediaTypeFormatter

Parameters

Return Value

Type: System.Net.Http.Formatting.MediaTypeFormatter

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

See Also

MediaTypeFormatterCollection Class
System.Net.Http.Formatting Namespace

Return to top