Table of Contents

Class RecordSrv

Namespace
Ubiety.Dns.Core.Records
Assembly
Ubiety.Dns.Core.dll

RFC 2782 - DNS resource record for service discovery.

public sealed record RecordSrv : Record, IEquatable<Record>, IComparable<RecordSrv>, IEquatable<RecordSrv>
Inheritance
RecordSrv
Implements
Inherited Members

Constructors

RecordSrv(RecordReader)

Initializes a new instance of the RecordSrv class from the specified RecordReader.

public RecordSrv(RecordReader reader)

Parameters

reader RecordReader

The RecordReader used to read the SRV record data.

Properties

Port

Gets the port on this target host of this service.

public ushort Port { get; }

Property Value

ushort

Priority

Gets the priority of the target host. Lower values are tried first.

public ushort Priority { get; }

Property Value

ushort

Target

Gets the domain name of the target host for this service.

public string Target { get; }

Property Value

string

Weight

Gets the relative weight for entries with the same priority. Higher values are more likely to be selected.

public ushort Weight { get; }

Property Value

ushort

Methods

CompareTo(RecordSrv?)

Compares this instance to another RecordSrv instance for ordering.

public int CompareTo(RecordSrv? other)

Parameters

other RecordSrv

The RecordSrv instance to compare to, which may be null.

Returns

int

An integer that indicates the relative order of the objects being compared.

ToString()

Returns a string representation of the SRV record data.

public override string ToString()

Returns

string

A string containing the SRV record fields in display order.

Operators

operator >(RecordSrv, RecordSrv)

Determines if the left record is greater than the right record based on priority and weight.

public static bool operator >(RecordSrv left, RecordSrv right)

Parameters

left RecordSrv

The left RecordSrv instance.

right RecordSrv

The right RecordSrv instance.

Returns

bool

true if the left record is greater; otherwise, false.

operator >=(RecordSrv, RecordSrv)

Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method for ordering or sorting its instances.

public static bool operator >=(RecordSrv left, RecordSrv right)

Parameters

left RecordSrv
right RecordSrv

Returns

bool

operator <(RecordSrv, RecordSrv)

Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method for ordering or sorting its instances.

public static bool operator <(RecordSrv left, RecordSrv right)

Parameters

left RecordSrv
right RecordSrv

Returns

bool

operator <=(RecordSrv, RecordSrv)

Defines a generalized comparison method that a value type or class implements to create a type-specific comparison method for ordering or sorting its instances.

public static bool operator <=(RecordSrv left, RecordSrv right)

Parameters

left RecordSrv
right RecordSrv

Returns

bool