Export (0) Print
Expand All

MediaTypeFormatterCollection.FindWriter Method

Searches 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 write.

mediaType
Type: MediaTypeHeaderValue

The media type to match on.

Return Value

Type: System.Net.Http.Formatting.MediaTypeFormatter
The MediaTypeFormatter that can write the type, or null if no formatter found.
Show:
© 2014 Microsoft