Show / Hide Table of Contents

Class PresentationWriter

Methods to write DNS data items encoded in the presentation (text) format.

Inheritance
Object
PresentationWriter
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.dll
Syntax
public class PresentationWriter

Constructors

| Improve this Doc View Source

PresentationWriter(TextWriter)

Creates a new instance of the PresentationWriter using the specified TextWriter.

Declaration
public PresentationWriter(TextWriter text)
Parameters
Type Name Description
TextWriter text

The source for data items.

Methods

| Improve this Doc View Source

WriteBase16String(Byte[], Boolean)

Write bytes encoded in base-16.

Declaration
public void WriteBase16String(byte[] value, bool appendSpace = true)
Parameters
Type Name Description
Byte[] value

The value to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteBase64String(Byte[], Boolean)

Write bytes encoded in base-64.

Declaration
public void WriteBase64String(byte[] value, bool appendSpace = true)
Parameters
Type Name Description
Byte[] value

The value to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteByte(Byte, Boolean)

Write an byte.

Declaration
public void WriteByte(byte value, bool appendSpace = true)
Parameters
Type Name Description
Byte value

The value to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteDateTime(DateTime, Boolean)

Write a date/time.

Declaration
public void WriteDateTime(DateTime value, bool appendSpace = true)
Parameters
Type Name Description
DateTime value

The UTC DateTime. Resolution is seconds.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteDnsClass(DnsClass, Boolean)

Write a DNS Class.

Declaration
public void WriteDnsClass(DnsClass value, bool appendSpace = true)
Parameters
Type Name Description
DnsClass value

The value to write.

Boolean appendSpace

Write a space after the value.

Remarks

Either the name of a DnsClass or the string "CLASSx".

| Improve this Doc View Source

WriteDnsType(DnsType, Boolean)

Write a DNS Type.

Declaration
public void WriteDnsType(DnsType value, bool appendSpace = true)
Parameters
Type Name Description
DnsType value

The value to write.

Boolean appendSpace

Write a space after the value.

Remarks

Either the name of a DnsType or the string "TYPEx".

| Improve this Doc View Source

WriteDomainName(DomainName, Boolean)

Write a domain name.

Declaration
public void WriteDomainName(DomainName value, bool appendSpace = true)
Parameters
Type Name Description
DomainName value

The value to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteEndOfLine()

Writes a CRLF.

Declaration
public void WriteEndOfLine()
| Improve this Doc View Source

WriteIPAddress(IPAddress, Boolean)

Write an Internet address.

Declaration
public void WriteIPAddress(IPAddress value, bool appendSpace = true)
Parameters
Type Name Description
IPAddress value

The value to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteSpace()

Writes a space.

Declaration
public void WriteSpace()
| Improve this Doc View Source

WriteString(String, Boolean)

Write a string.

Declaration
public void WriteString(string value, bool appendSpace = true)
Parameters
Type Name Description
String value

An ASCII string.

Boolean appendSpace

Write a space after the value.

Remarks

Quotes and escapes are added as needned.

| Improve this Doc View Source

WriteStringUnencoded(String, Boolean)

Write a string.

Declaration
public void WriteStringUnencoded(string value, bool appendSpace = true)
Parameters
Type Name Description
String value

An ASCII string.

Boolean appendSpace

Write a space after the value.

Remarks

Quotes and escapes are NOT added.

| Improve this Doc View Source

WriteTimeSpan16(TimeSpan, Boolean)

Write a time span (interval) in 16-bit seconds.

Declaration
public void WriteTimeSpan16(TimeSpan value, bool appendSpace = true)
Parameters
Type Name Description
TimeSpan value

The number of seconds to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteTimeSpan32(TimeSpan, Boolean)

Write a time span (interval) in 32-bit seconds.

Declaration
public void WriteTimeSpan32(TimeSpan value, bool appendSpace = true)
Parameters
Type Name Description
TimeSpan value

The number of seconds to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteUInt16(UInt16, Boolean)

Write an unsigned short.

Declaration
public void WriteUInt16(ushort value, bool appendSpace = true)
Parameters
Type Name Description
UInt16 value

The value to write.

Boolean appendSpace

Write a space after the value.

| Improve this Doc View Source

WriteUInt32(UInt32, Boolean)

Write an unsigned int.

Declaration
public void WriteUInt32(uint value, bool appendSpace = true)
Parameters
Type Name Description
UInt32 value

The value to write.

Boolean appendSpace

Write a space after the value.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX