Table of Contents

Class Resource

Namespace
Iot.Device.MulticastDns.Entities
Assembly
Iot.Device.MulticastDns.dll

A Resource is part of a Message and can be an Answer, a Server or an Additional Resource.

public class Resource
Inheritance
Resource
Derived

Constructors

Resource(string, DnsResourceType, int)

Initializes a new instance of the Resource class.

public Resource(string domain, DnsResourceType type, int ttl)

Parameters

domain string

The domain this resource is about.

type DnsResourceType

The type of this resource.

ttl int

The TTL of this resource.

Resource(string, int)

Initializes a new instance of the Resource class.

public Resource(string domain, int ttl)

Parameters

domain string

The domain this resource is about.

ttl int

The TTL of this resource.

Properties

Domain

Gets The domain this resource is about.

public string Domain { get; }

Property Value

string

ResourceClass

Gets The class of this resource.

public ushort ResourceClass { get; }

Property Value

ushort

ResourceType

Gets The type of this resource.

public DnsResourceType ResourceType { get; }

Property Value

DnsResourceType

Ttl

Gets or sets The TTL of this resource.

public int Ttl { get; set; }

Property Value

int

Methods

GetBytes()

Returns a byte[] representation of this Resource.

public byte[] GetBytes()

Returns

byte[]

A byte[] representation of this Resource.

GetBytesInternal()

Returns a byte[] representation of this Resource.

protected virtual byte[] GetBytesInternal()

Returns

byte[]

A byte[] representation of this Resource.