Share via


IEndpointComparerPolicy Interface

Definition

A MatcherPolicy interface that can be implemented to sort endpoints. Implementations of IEndpointComparerPolicy must inherit from MatcherPolicy and should be registered in the dependency injection container as singleton services of type MatcherPolicy.

public interface class IEndpointComparerPolicy
public interface IEndpointComparerPolicy
type IEndpointComparerPolicy = interface
Public Interface IEndpointComparerPolicy
Derived

Remarks

Candidates in a CandidateSet are sorted based on their priority. Defining a IEndpointComparerPolicy adds an additional criterion to the sorting operation used to order candidates.

As an example, the implementation of HttpMethodMatcherPolicy implements IEndpointComparerPolicy to ensure that endpoints matching specific HTTP methods are sorted with a higher priority than endpoints without a specific HTTP method requirement.

Properties

Comparer

Gets an IComparer<T> that will be used to sort the endpoints.

Applies to