Class ResourceRegistry
Metadata on resource records.
Inherited Members
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.dll
Syntax
public static class ResourceRegistry
Fields
| Improve this Doc View SourceRecords
All the resource records.
Declaration
public static Dictionary<DnsType, Func<ResourceRecord>> Records
Field Value
| Type | Description |
|---|---|
| Dictionary<DnsType, Func<ResourceRecord>> |
Remarks
The key is the DNS Resource Record type, DnsType. The value is a function that returns a new ResourceRecord.
Methods
| Improve this Doc View SourceCreate(DnsType)
Gets the resource record for the DnsType.
Declaration
public static ResourceRecord Create(DnsType type)
Parameters
| Type | Name | Description |
|---|---|---|
| DnsType | type | One of the DnsType values. |
Returns
| Type | Description |
|---|---|
| ResourceRecord | A new instance derived from ResourceRecord. |
Remarks
When the type is not implemented, a new
of UnknownRecord is returned.
Register<T>()
Register a new resource record.
Declaration
public static void Register<T>()
where T : ResourceRecord, new()
Type Parameters
| Name | Description |
|---|---|
| T | A derived class of ResourceRecord. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | When RR TYPE is zero. |