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)

public MediaTypeFormatter FindWriter(
	Type type,
	MediaTypeHeaderValue mediaType
)

Parameters

type
Type: System.Type

The .NET type to read

mediaType
Type: System.Net.Http.Headers.MediaTypeHeaderValue

The media type to match on.

Return Value

Type: System.Net.Http.Formatting.MediaTypeFormatter

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

Return to top
Show: