Class RecordSrv
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
readerRecordReaderThe 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
Priority
Gets the priority of the target host. Lower values are tried first.
public ushort Priority { get; }
Property Value
Target
Gets the domain name of the target host for this service.
public string Target { get; }
Property Value
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
Methods
CompareTo(RecordSrv?)
Compares this instance to another RecordSrv instance for ordering.
public int CompareTo(RecordSrv? other)
Parameters
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
Returns
- bool
trueif 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
Returns
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
Returns
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)