C# Класс LumiSoft.Net.Dns.Client.DnsCache

This class implements dns query cache.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddToCache ( string qname, int qtype, DnsServerResponse answers ) : void

Adds dns records to cache. If old entry exists, it is replaced.

ClearCache ( ) : void

Clears DNS cache.

DeSerializeCache ( byte cacheData ) : void

DeSerializes stored cache.

GetFromCache ( string qname, int qtype ) : DnsServerResponse

Tries to get dns records from cache, if any.

SerializeCache ( ) : byte[]

Serializes current cache.

Приватные методы

Метод Описание
DnsCache ( ) : System

Default constructor.

Описание методов

AddToCache() публичный статический Метод

Adds dns records to cache. If old entry exists, it is replaced.
public static AddToCache ( string qname, int qtype, DnsServerResponse answers ) : void
qname string
qtype int
answers DnsServerResponse
Результат void

ClearCache() публичный статический Метод

Clears DNS cache.
public static ClearCache ( ) : void
Результат void

DeSerializeCache() публичный статический Метод

DeSerializes stored cache.
public static DeSerializeCache ( byte cacheData ) : void
cacheData byte This value must be DnsCache.SerializeCache() method value.
Результат void

GetFromCache() публичный статический Метод

Tries to get dns records from cache, if any.
public static GetFromCache ( string qname, int qtype ) : DnsServerResponse
qname string
qtype int
Результат DnsServerResponse

SerializeCache() публичный статический Метод

Serializes current cache.
public static SerializeCache ( ) : byte[]
Результат byte[]