internal ANameRecord(string value, DnsRecordId id, DomainName name, RecordSource source, DomainId sourceId, TimeToLive ttl, GlobalTrafficDirectorLocation?gtdLocation) : base(id, name, source, sourceId, ttl, gtdLocation) { if (DomainName.TryParse(value, out var domainName)) { TargetDomain = domainName; TargetDomainWasRooted = value.EndsWith(".", StringComparison.OrdinalIgnoreCase); } else if (IPv4.TryParse(value, out var ipv4)) { TargetIPv4 = ipv4; } else if (IPv6.TryParse(value, out var ipv6)) { TargetIpv6 = ipv6; } else { throw new FormatException($"Unrecognised value for an ANAME record: `{value}`. Expecting a domain name, IPv4 or IPv6 address."); } }
public ANameRecord(IPv6 targetIpv6, DnsRecordId id, DomainName name, DomainId parentDomainId, TimeToLive timeToLive, RecordSource recordSource = default, GlobalTrafficDirectorLocation?globalTrafficDirectorLocation = null) : base(id, name, parentDomainId, timeToLive, recordSource, globalTrafficDirectorLocation) { TargetIpv6 = targetIpv6; }
public NameServer(DomainName fqdn, IPv4 ipv4, IPv6 ipv6) { FullyQualifiedDomainName = fqdn; IPv4 = ipv4; IPv6 = ipv6; }
internal AAAARecord(DnsRecordId id, DomainName name, DomainId sourceId, TimeToLive ttl, RecordSource source, GlobalTrafficDirectorLocation?gtdLocation, IPv6 value) : base(id, name, source, sourceId, ttl, gtdLocation) { Target = value; }