EndpointMetadataComparer<TMetadata>.CompareMetadata Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.