internal AuthZoneInfo(AuthZone zone, bool loadHistory = false) { _zone = zone; _name = _zone.Name; if (_zone is PrimaryZone primaryZone) { _type = AuthZoneType.Primary; if (loadHistory) { _zoneHistory = primaryZone.GetHistory(); } _tsigKeyNames = primaryZone.TsigKeyNames; } else if (_zone is SecondaryZone secondaryZone) { _type = AuthZoneType.Secondary; if (loadHistory) { _zoneHistory = secondaryZone.GetHistory(); } _expiry = secondaryZone.Expiry; _tsigKeyNames = secondaryZone.TsigKeyNames; } else if (_zone is StubZone stubZone) { _type = AuthZoneType.Stub; _expiry = stubZone.Expiry; } else if (_zone is ForwarderZone) { _type = AuthZoneType.Forwarder; } else { _type = AuthZoneType.Unknown; } _disabled = _zone.Disabled; _zoneTransfer = zone.ZoneTransfer; _zoneTransferNameServers = zone.ZoneTransferNameServers; _notify = zone.Notify; _notifyNameServers = zone.NotifyNameServers; }
internal AuthZoneInfo(AuthZone zone) { _zone = zone; _name = _zone.Name; if (_zone is PrimaryZone) { _type = AuthZoneType.Primary; } else if (_zone is SecondaryZone) { _type = AuthZoneType.Secondary; } else if (_zone is StubZone) { _type = AuthZoneType.Stub; } else if (_zone is ForwarderZone) { _type = AuthZoneType.Forwarder; } else { _type = AuthZoneType.Unknown; } _disabled = _zone.Disabled; _zoneTransfer = zone.ZoneTransfer; _zoneTransferNameServers = zone.ZoneTransferNameServers; _notify = zone.Notify; _notifyNameServers = zone.NotifyNameServers; switch (_type) { case AuthZoneType.Secondary: _expiry = (_zone as SecondaryZone).Expiry; break; case AuthZoneType.Stub: _expiry = (_zone as StubZone).Expiry; break; } }
protected SubDomainZone(AuthZone authoritativeZone, string name) : base(name) { _authoritativeZone = authoritativeZone; }