예제 #1
0
 public DnsZoneFile Add(DnsZoneFile other)
 {
     foreach (var record in other.Records)
     {
         Records.Add(record);
     }
     return(this);
 }
예제 #2
0
        public DnsZoneFile Filter(string origin)
        {
            var res = new DnsZoneFile();

            origin = origin.ToLowerInvariant();
            var subdomain = ("." + origin);

            foreach (var record in Records)
            {
                if (record.Name.ToLowerInvariant() == origin || record.Name.EndsWith(subdomain))
                {
                    res.Records.Add(record);
                }
            }
            return(res);
        }