public static DnsResourceRecordInfo GetRecordInfo(this DnsResourceRecord record) { if (record.Tag is not DnsResourceRecordInfo rrInfo) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } return(rrInfo); }
public static void SetGlueRecords(this DnsResourceRecord record, IReadOnlyList <DnsResourceRecord> glueRecords) { if (record.Tag is not DnsResourceRecordInfo rrInfo) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.GlueRecords = glueRecords; }
public static void SetDeletedOn(this DnsResourceRecord record, DateTime value) { if (record.Tag is not DnsResourceRecordInfo rrInfo) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.DeletedOn = value; }
public static void SetPrimaryNameServers(this DnsResourceRecord record, IReadOnlyList <NameServerAddress> primaryNameServers) { if (record.Tag is not DnsResourceRecordInfo rrInfo) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.PrimaryNameServers = primaryNameServers; }
public static void Disable(this DnsResourceRecord record) { if (record.Tag is not DnsResourceRecordInfo rrInfo) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.Disabled = true; }
public static void SetComments(this DnsResourceRecord record, string value) { if (record.Tag is not DnsResourceRecordInfo rrInfo) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.Comments = value; }
public static void Enable(this DnsResourceRecord record) { DnsResourceRecordInfo rrInfo = record.Tag as DnsResourceRecordInfo; if (rrInfo == null) { return; } rrInfo.Disabled = false; }
public static bool IsDisabled(this DnsResourceRecord record) { DnsResourceRecordInfo rrInfo = record.Tag as DnsResourceRecordInfo; if (rrInfo == null) { return(false); } return(rrInfo.Disabled); }
public static string GetComments(this DnsResourceRecord record) { DnsResourceRecordInfo rrInfo = record.Tag as DnsResourceRecordInfo; if (rrInfo is null) { return(null); } return(rrInfo.Comments); }
public static void SetGlueRecords(this DnsResourceRecord record, IReadOnlyList <DnsResourceRecord> glueRecords) { DnsResourceRecordInfo rrInfo = record.Tag as DnsResourceRecordInfo; if (rrInfo == null) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.GlueRecords = glueRecords; }
public static void Disable(this DnsResourceRecord record) { DnsResourceRecordInfo rrInfo = record.Tag as DnsResourceRecordInfo; if (rrInfo == null) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.Disabled = true; }
public static void SetComments(this DnsResourceRecord record, string value) { DnsResourceRecordInfo rrInfo = record.Tag as DnsResourceRecordInfo; if (rrInfo is null) { rrInfo = new DnsResourceRecordInfo(); record.Tag = rrInfo; } rrInfo.Comments = value; }
public static IReadOnlyList <DnsResourceRecord> GetGlueRecords(this DnsResourceRecord record) { DnsResourceRecordInfo rrInfo = record.Tag as DnsResourceRecordInfo; if (rrInfo == null) { return(Array.Empty <DnsResourceRecord>()); } IReadOnlyList <DnsResourceRecord> glueRecords = rrInfo.GlueRecords; if (glueRecords == null) { return(Array.Empty <DnsResourceRecord>()); } return(glueRecords); }