/// <summary> /// Writes the RDATA of this resource record to the specified /// <see cref="AK.Net.Dns.IDnsWriter"/>. /// </summary> /// <param name="writer">The writer.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="writer"/> is <see langword="null"/>. /// </exception> public override void WriteData(IDnsWriter writer) { Guard.NotNull(writer, "writer"); writer.WriteName(this.RMbox); writer.WriteName(this.EMbox); }
/// <summary> /// Writes the RDATA of this resource record to the specified /// <see cref="AK.Net.Dns.IDnsWriter"/>. /// </summary> /// <param name="writer">The writer.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="writer"/> is <see langword="null"/>. /// </exception> public override void WriteData(IDnsWriter writer) { Guard.NotNull(writer, "writer"); writer.WriteName(this.Master); writer.WriteName(this.RMbox); writer.WriteUInt32(this.Serial); writer.WriteTtl(this.Refresh); writer.WriteTtl(this.Retry); writer.WriteTtl(this.Expire); writer.WriteTtl(this.Minimum); }
/// <summary> /// Writes the RDATA of this resource record to the specified /// <see cref="AK.Net.Dns.IDnsWriter"/>. /// </summary> /// <param name="writer">The writer.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="writer"/> <see langword="null"/>. /// </exception> public override void WriteData(IDnsWriter writer) { Guard.NotNull(writer, "writer"); // The RFC states that the RDATA section should not be compressed. writer.WriteName(this.Target, false); }
/// <summary> /// Writes the RDATA of this resource record to the specified /// <see cref="AK.Net.Dns.IDnsWriter"/>. /// </summary> /// <param name="writer">The writer.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="writer"/> is <see langword="null"/>. /// </exception> public override void WriteData(IDnsWriter writer) { Guard.NotNull(writer, "writer"); writer.WriteInt16(this.Preference); writer.WriteName(this.Exchange); }
/// <summary> /// Writes this question using the specified /// <see cref="AK.Net.Dns.IDnsWriter"/>. /// </summary> /// <param name="writer">The writer.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="writer"/> is <see langword="null"/>. /// </exception> public virtual void Write(IDnsWriter writer) { Guard.NotNull(writer, "writer"); writer.WriteName(this.Name); writer.WriteQueryType(this.Type); writer.WriteQueryClass(this.Class); }
/// <summary> /// Writes the RDATA of this resource record to the specified /// <see cref="AK.Net.Dns.IDnsWriter"/>. /// </summary> /// <param name="writer">The writer.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="writer"/> <see langword="null"/>. /// </exception> public override void WriteData(IDnsWriter writer) { Guard.NotNull(writer, "writer"); writer.WriteUInt16(this.Priority); writer.WriteUInt16(this.Weight); writer.WriteUInt16(this.Port); writer.WriteName(this.Target); }
public void write_writes_data_in_correct_order_and_with_correct_arguments() { MockRepository mocks = new MockRepository(); IDnsWriter writer = mocks.StrictMock <IDnsWriter>(); DnsQuestion question = new DnsQuestion(DnsName.Parse("test.com"), DnsQueryType.MX, DnsQueryClass.IN); using (mocks.Ordered()) { writer.WriteName(question.Name); writer.WriteQueryType(question.Type); writer.WriteQueryClass(question.Class); } mocks.ReplayAll(); question.Write(writer); mocks.VerifyAll(); }
/// <summary> /// Writes the RDATA of this resource record to the specified /// <see cref="AK.Net.Dns.IDnsWriter"/>. /// </summary> /// <param name="writer">The writer.</param> /// <exception cref="System.ArgumentNullException"> /// Thrown when <paramref name="writer"/> <see langword="null"/>. /// </exception> public override void WriteData(IDnsWriter writer) { Guard.NotNull(writer, "writer"); writer.WriteName(this.Canonical); }