DefaultContentNegotiator.ComputeFormatterMatches Metoda

Definice

Určete, jak dobře má každý formátovací modul odpovídat přidružení MediaTypeFormatterMatchRanking hodnoty ke formátovacímu modulu. Pak přidružte kvalitu shody na základě faktorů q-a dalších parametrů. Výsledkem této metody je kolekce nalezených shod a přiřazená hodnota kvality.

protected:
 virtual System::Collections::ObjectModel::Collection<System::Net::Http::Formatting::MediaTypeFormatterMatch ^> ^ ComputeFormatterMatches(Type ^ type, System::Net::Http::HttpRequestMessage ^ request, System::Collections::Generic::IEnumerable<System::Net::Http::Formatting::MediaTypeFormatter ^> ^ formatters);
protected virtual System.Collections.ObjectModel.Collection<System.Net.Http.Formatting.MediaTypeFormatterMatch> ComputeFormatterMatches (Type type, System.Net.Http.HttpRequestMessage request, System.Collections.Generic.IEnumerable<System.Net.Http.Formatting.MediaTypeFormatter> formatters);
abstract member ComputeFormatterMatches : Type * System.Net.Http.HttpRequestMessage * seq<System.Net.Http.Formatting.MediaTypeFormatter> -> System.Collections.ObjectModel.Collection<System.Net.Http.Formatting.MediaTypeFormatterMatch>
override this.ComputeFormatterMatches : Type * System.Net.Http.HttpRequestMessage * seq<System.Net.Http.Formatting.MediaTypeFormatter> -> System.Collections.ObjectModel.Collection<System.Net.Http.Formatting.MediaTypeFormatterMatch>
Protected Overridable Function ComputeFormatterMatches (type As Type, request As HttpRequestMessage, formatters As IEnumerable(Of MediaTypeFormatter)) As Collection(Of MediaTypeFormatterMatch)

Parametry

type
Type

Typ, který se má serializovat.

request
HttpRequestMessage

Žádost

formatters
IEnumerable<System.Net.Http.Formatting.MediaTypeFormatter>

Sada objektů, System.Net.Http.Formatting.MediaTypeFormatter ze kterých se má vybírat

Návraty

Collection<MediaTypeFormatterMatch>

Kolekce obsahující všechny shody

Platí pro