Ejemplo n.º 1
0
        public void WriteTimeSpan32()
        {
            var text   = new StringWriter();
            var writer = new PresentationWriter(text);

            writer.WriteTimeSpan32(TimeSpan.FromSeconds(int.MaxValue));
            writer.WriteTimeSpan32(TimeSpan.Zero, appendSpace: false);
            Assert.AreEqual("2147483647 0", text.ToString());
        }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public override void WriteData(PresentationWriter writer)
 {
     writer.WriteDomainName(PrimaryName);
     writer.WriteDomainName(Mailbox);
     writer.WriteUInt32(SerialNumber);
     writer.WriteTimeSpan32(Refresh);
     writer.WriteTimeSpan32(Retry);
     writer.WriteTimeSpan32(Expire);
     writer.WriteTimeSpan32(Minimum, appendSpace: false);
 }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public override void WriteData(PresentationWriter writer)
 {
     writer.WriteDnsType(TypeCovered);
     writer.WriteByte((byte)Algorithm);
     writer.WriteByte(Labels);
     writer.WriteTimeSpan32(OriginalTTL);
     writer.WriteDateTime(SignatureExpiration);
     writer.WriteDateTime(SignatureInception);
     writer.WriteUInt16(KeyTag);
     writer.WriteDomainName(SignerName);
     writer.WriteBase64String(Signature, appendSpace: false);
 }
Ejemplo n.º 4
0
        /// <inheritdoc />
        public void Write(PresentationWriter writer)
        {
            writer.WriteDomainName(Name);
            if (TTL != DefaultTTL)
            {
                writer.WriteTimeSpan32(TTL);
            }
            writer.WriteDnsClass(Class);
            writer.WriteDnsType(Type);

            WriteData(writer);
            writer.WriteEndOfLine();
        }