/// <inheritdoc/> public void ReadBytes(byte[] bytes, ref int offset, int length) { MName = string.Join(".", DnsByteExtensions.ReadString(bytes, ref offset)); RName = string.Join(".", DnsByteExtensions.ReadString(bytes, ref offset)); Serial = DnsByteExtensions.ReadUInt32(bytes, ref offset); Refresh = TimeSpan.FromSeconds(DnsByteExtensions.ReadInt32(bytes, ref offset)); Retry = TimeSpan.FromSeconds(DnsByteExtensions.ReadInt32(bytes, ref offset)); Expire = TimeSpan.FromSeconds(DnsByteExtensions.ReadInt32(bytes, ref offset)); Minimum = TimeSpan.FromSeconds(DnsByteExtensions.ReadUInt32(bytes, ref offset)); }
public void ReadCnameRecordTests(int example, int offset, string[] expected) { var value = DnsByteExtensions.ReadString(SampleDnsPackets.Answers[example - 1], ref offset); Assert.Equal(expected, value); }
/// <inheritdoc/> public void ReadBytes(byte[] bytes, ref int offset, int length) { Preference = DnsByteExtensions.ReadUInt16(bytes, ref offset); Exchange = string.Join(".", DnsByteExtensions.ReadString(bytes, ref offset)); }
/// <inheritdoc/> public void ReadBytes(byte[] bytes, ref int offset, int length) { Text = string.Join(".", DnsByteExtensions.ReadString(bytes, ref offset, offset + length)); }