本文整理汇总了C#中RecordClass类的典型用法代码示例。如果您正苦于以下问题:C# RecordClass类的具体用法?C# RecordClass怎么用?C# RecordClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RecordClass类属于命名空间,在下文中一共展示了RecordClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: KeyRecordBase
/// <summary>
/// Creates a new key record.
/// </summary>
/// <param name="name">The name.</param>
/// <param name="recordClass">The record class.</param>
/// <param name="timeToLive">The time-to-live.</param>
/// <param name="flags">The flags.</param>
/// <param name="protocol">The protocol.</param>
/// <param name="algorithm">The algorithm.</param>
protected KeyRecordBase(string name, RecordClass recordClass, int timeToLive, ushort flags, ProtocolType protocol, DnsSecAlgorithm algorithm)
: base(name, RecordType.Key, recordClass, timeToLive)
{
this.Flags = flags;
this.Protocol = protocol;
this.Algorithm = algorithm;
}
示例2: WriteQuestion
public void WriteQuestion(Name name, RecordType qtype, RecordClass qclass = RecordClass.Internet)
{
WriteName(name);
WriteUInt16((ushort)qtype);
WriteUInt16((ushort)qclass);
_questionCount++;
}
示例3: DiffieHellmanKeyRecord
/// <summary>
/// Creates a new instance of the DiffieHellmanKeyRecord class
/// </summary>
/// <param name="name"> Name of the record </param>
/// <param name="recordClass"> Class of the record </param>
/// <param name="timeToLive"> Seconds the record should be cached at most </param>
/// <param name="flags"> Flags of the key </param>
/// <param name="protocol"> Protocol for which the key is used </param>
/// <param name="prime"> Binary data of the prime of the key </param>
/// <param name="generator"> Binary data of the generator of the key </param>
/// <param name="publicValue"> Binary data of the public value </param>
public DiffieHellmanKeyRecord(string name, RecordClass recordClass, int timeToLive, ushort flags, ProtocolType protocol, byte[] prime, byte[] generator, byte[] publicValue)
: base(name, recordClass, timeToLive, flags, protocol, DnsSecAlgorithm.DiffieHellman)
{
Prime = prime ?? new byte[] { };
Generator = generator ?? new byte[] { };
PublicValue = publicValue ?? new byte[] { };
}
示例4: ResourceRecord
public ResourceRecord(DnsReader br)
{
_domain = br.ReadDomain();
_qtype = (RecordType)br.ReadInt16();
_qclass = (RecordClass)br.ReadInt16();
_ttl = br.ReadInt32();
int recordLength = br.ReadInt16();
if (recordLength != 0)
{
switch (_qtype)
{
case RecordType.A: _record = new ARecord(br); break;
case RecordType.CNAME: _record = new CNAMERecord(br); break;
case RecordType.MX: _record = new MXRecord(br); break;
case RecordType.NS: _record = new NSRecord(br); break;
case RecordType.SOA: _record = new SOARecord(br); break;
case RecordType.TXT: _record = new TXTRecord(br); break;
case RecordType.PTR: _record = new PTRERecord(br); break;
// NetBIOS related records
case RecordType.NB: _record = new NBRecord(br); break;
default:
br += recordLength;
break;
}
}
}
示例5: DnsResponse
private DnsResponse(ushort messageId, DnsName queryName, RecordType queryType, RecordClass queryClass)
{
this.MessageId = messageId;
this.QueryName = queryName;
this.QueryType = queryType;
this.QueryClass = queryClass;
}
示例6: LogRecord
public LogRecord(String message, RecordClass recordClass, TimeSpan? runningTime, DateTime timeStamp)
{
this.message = message;
this.recordClass = recordClass;
this.runningTime = runningTime;
this.timeStamp = timeStamp;
}
示例7: DnsRecordBase
protected DnsRecordBase(string name, RecordType recordType, RecordClass recordClass, int timeToLive)
{
Name = name ?? String.Empty;
RecordType = recordType;
RecordClass = recordClass;
TimeToLive = timeToLive;
}
示例8: ResourceRecord
internal ResourceRecord(string name, RecordType type, RecordClass rClass, DateTime expiry)
{
_name = name;
_type = type;
_class = rClass;
_expiry = expiry;
}
示例9: CDsRecord
/// <summary>
/// Creates a new instance of the CDsRecord class
/// </summary>
/// <param name="name"> Name of the record </param>
/// <param name="recordClass"> Class of the record </param>
/// <param name="timeToLive"> Seconds the record should be cached at most </param>
/// <param name="keyTag"> Key tag </param>
/// <param name="algorithm"> Algorithm used </param>
/// <param name="digestType"> Type of the digest </param>
/// <param name="digest"> Binary data of the digest </param>
public CDsRecord(DomainName name, RecordClass recordClass, int timeToLive, ushort keyTag, DnsSecAlgorithm algorithm, DnsSecDigestType digestType, byte[] digest)
: base(name, RecordType.Ds, recordClass, timeToLive)
{
KeyTag = keyTag;
Algorithm = algorithm;
DigestType = digestType;
Digest = digest ?? new byte[] { };
}
示例10: DsRecord
/// <summary>
/// Creates a new instance of the DsRecord class.
/// </summary>
/// <param name="name">Name of the record.</param>
/// <param name="recordClass">Class of the record.</param>
/// <param name="timeToLive">Seconds the record should be cached at most.</param>
/// <param name="keyTag">Key tag.</param>
/// <param name="algorithm">Algorithm used.</param>
/// <param name="digestType">Type of the digest.</param>
/// <param name="digest">Binary data of the digest.</param>
public DsRecord(string name, RecordClass recordClass, int timeToLive, ushort keyTag, DnsSecAlgorithm algorithm, DnsSecDigestType digestType, byte[] digest)
: base(name, RecordType.Ds, recordClass, timeToLive)
{
this.KeyTag = keyTag;
this.Algorithm = algorithm;
this.DigestType = digestType;
this.Digest = digest ?? new byte[] { };
}
示例11: NSec3ParamRecord
public NSec3ParamRecord(string name, RecordClass recordClass, int timeToLive, DnsSecAlgorithm hashAlgorithm, byte flags, ushort iterations, byte[] salt)
: base(name, RecordType.NSec3Param, recordClass, timeToLive)
{
HashAlgorithm = hashAlgorithm;
Flags = flags;
Iterations = iterations;
Salt = salt ?? new byte[] { };
}
示例12: DnsKeyRecord
public DnsKeyRecord(string name, RecordClass recordClass, int timeToLive, ushort flags, byte protocol, DnsSecAlgorithm algorithm, byte[] publicKey)
: base(name, RecordType.DnsKey, recordClass, timeToLive)
{
Flags = flags;
Protocol = protocol;
Algorithm = algorithm;
PublicKey = publicKey ?? new byte[] { };
}
示例13: DnsMessageBase
protected DnsMessageBase(ushort messageId, DnsName queryName, RecordType queryType, RecordClass queryClass)
: this()
{
this.MessageId = messageId;
this.QueryCount = 1;
this.QueryName = queryName;
this.QueryType = queryType;
this.QueryClass = queryClass;
}
示例14: ResourceRecord
public ResourceRecord(Domain domain, byte[] data, RecordType type,
RecordClass klass = RecordClass.IN, TimeSpan ttl = default(TimeSpan))
{
this.domain = domain;
this.type = type;
this.klass = klass;
this.ttl = ttl;
this.data = data;
}
示例15: IP4AddressRecord
internal IP4AddressRecord(string name, RecordType type, RecordClass rClass, DateTime expiry, PacketReader reader)
: base(name, type, rClass, expiry)
{
ushort dataLen = reader.ReadUShort();
int pos = reader.Position;
_address = new IPAddress(reader.ReadBytes(dataLen));
reader.Position = pos + dataLen;
}