Dela via


CandidateSet Class

Definition

Represents a set of Endpoint candidates that have been matched by the routing system. Used by implementations of EndpointSelector and IEndpointSelectorPolicy.

public ref class CandidateSet sealed
public sealed class CandidateSet
type CandidateSet = class
Public NotInheritable Class CandidateSet
Inheritance
CandidateSet

Constructors

CandidateSet(Endpoint[], RouteValueDictionary[], Int32[])

Initializes a new instances of the CandidateSet class with the provided endpoints, values, and scores.

The constructor is provided to enable unit tests of implementations of EndpointSelector and IEndpointSelectorPolicy.

Properties

Count

Gets the count of candidates in the set.

Item[Int32]

Gets the CandidateState associated with the candidate Endpoint at index.

Methods

ExpandEndpoint(Int32, IReadOnlyList<Endpoint>, IComparer<Endpoint>)

Replaces the Endpoint at the provided index with the provided endpoints.

IsValidCandidate(Int32)

Gets a value which indicates where the Endpoint is considered a valid candidate for the current request.

ReplaceEndpoint(Int32, Endpoint, RouteValueDictionary)

Replaces the Endpoint at the provided index with the provided endpoint.

SetValidity(Int32, Boolean)

Sets the validity of the candidate at the provided index.

Applies to