using DnsClient.Protocol; using System.Collections.Generic; namespace System.Linq { /// /// Extension methods for where T is . /// public static class RecordCollectionExtension { /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable ARecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable NsRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable CnameRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable SoaRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable MbRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable MgRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable MrRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable NullRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable WksRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable PtrRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable HInfoRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable MxRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable TxtRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable RpRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable AfsDbRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable AaaaRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable SrvRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable UriRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s only. /// /// The records. /// The list of . public static IEnumerable CaaRecords(this IEnumerable records) { return records.OfType(); } /// /// Filters the elements of an to return s /// which have the . /// /// The records. /// The to filter for. /// The list of . public static IEnumerable OfRecordType(this IEnumerable records, ResourceRecordType type) { return records.Where(p => p.RecordType == type); } } }