Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Selects the first supported media type of a formatter.
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Protected Overridable Function MatchType ( _
type As Type, _
formatter As MediaTypeFormatter _
) As MediaTypeFormatterMatch
'Usage
Dim type As Type
Dim formatter As MediaTypeFormatter
Dim returnValue As MediaTypeFormatterMatch
returnValue = Me.MatchType(type, formatter)
protected virtual MediaTypeFormatterMatch MatchType(
Type type,
MediaTypeFormatter formatter
)
protected:
virtual MediaTypeFormatterMatch^ MatchType(
Type^ type,
MediaTypeFormatter^ formatter
)
abstract MatchType :
type:Type *
formatter:MediaTypeFormatter -> MediaTypeFormatterMatch
override MatchType :
type:Type *
formatter:MediaTypeFormatter -> MediaTypeFormatterMatch
protected function MatchType(
type : Type,
formatter : MediaTypeFormatter
) : MediaTypeFormatterMatch
Parameters
type
Type: System.TypeThe type to match.
formatter
Type: System.Net.Http.Formatting.MediaTypeFormatterThe formatter to match against.
Return Value
Type: System.Net.Http.Formatting.MediaTypeFormatterMatch
Returns a MediaTypeFormatterMatch with Ranking set to MatchOnCanWriteType, or null if there is no match.
Remarks
If ExcludeMatchOnTypeOnly is true, this method always returns null.