EndpointMetadataComparer<TMetadata>.CompareMetadata Method

Definition

Compares two TMetadata instances.

protected:
 virtual int CompareMetadata(TMetadata x, TMetadata y);
protected virtual int CompareMetadata (TMetadata x, TMetadata y);
protected virtual int CompareMetadata (TMetadata? x, TMetadata? y);
abstract member CompareMetadata : 'Metadata * 'Metadata -> int
override this.CompareMetadata : 'Metadata * 'Metadata -> int
Protected Overridable Function CompareMetadata (x As TMetadata, y As TMetadata) As Integer

Parameters

x
TMetadata

The first object to compare.

y
TMetadata

The second object to compare.

Returns

An implementation of this method must return a value less than zero if x is less than y, zero if x is equal to y, or a value greater than zero if x is greater than y.

Remarks

The base-class implementation of this method will compare metadata based on whether or not they are null. The effect of this is that when endpoints are being compared, the endpoint that defines an instance of TMetadata will be considered higher priority.

Applies to