本文整理汇总了C#中RecordReader.ReadBytes方法的典型用法代码示例。如果您正苦于以下问题:C# RecordReader.ReadBytes方法的具体用法?C# RecordReader.ReadBytes怎么用?C# RecordReader.ReadBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecordReader
的用法示例。
在下文中一共展示了RecordReader.ReadBytes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RecordTSIG
///<summary>
///</summary>
///<param name="rr"></param>
public RecordTSIG(RecordReader rr)
{
AlgorithmName = rr.ReadDomainName();
TimeSigned = rr.ReadUInt32() << 32 | rr.ReadUInt32();
Fudge = rr.ReadUInt16();
MacSize = rr.ReadUInt16();
Mac = rr.ReadBytes(MacSize);
OriginalId = rr.ReadUInt16();
Error = rr.ReadUInt16();
OtherLen = rr.ReadUInt16();
OtherData = rr.ReadBytes(OtherLen);
}
示例2: RecordTKEY
///<summary>
///</summary>
///<param name="rr"></param>
public RecordTKEY(RecordReader rr)
{
Algorithm = rr.ReadDomainName();
Inception = rr.ReadUInt32();
Expiration = rr.ReadUInt32();
Mode = rr.ReadUInt16();
Error = rr.ReadUInt16();
Keysize = rr.ReadUInt16();
Keydata = rr.ReadBytes(Keysize);
Othersize = rr.ReadUInt16();
Otherdata = rr.ReadBytes(Othersize);
}
示例3: RecordNXT
public RecordNXT(RecordReader rr)
{
ushort length = rr.ReadUInt16(-2);
NEXTDOMAINNAME = rr.ReadDomainName();
length -= (ushort)rr.Position;
BITMAP = new byte[length];
BITMAP = rr.ReadBytes(length);
}
示例4: RecordNULL
///<summary>
///</summary>
///<param name="rr"></param>
public RecordNULL(RecordReader rr)
{
rr.Position -= 2;
// re-read length
var rdlength = rr.ReadUInt16();
Anything = new byte[rdlength];
Anything = rr.ReadBytes(rdlength);
}
示例5: RecordTSIG
public RecordTSIG(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_algorithmName = recordReader.ReadDomainName();
m_timeSigned = recordReader.ReadUInt32() << 32 | recordReader.ReadUInt32();
m_fudge = recordReader.ReadUInt16();
m_macSize = recordReader.ReadUInt16();
m_mac = recordReader.ReadBytes(m_macSize);
m_originalId = recordReader.ReadUInt16();
m_error = recordReader.ReadUInt16();
m_otherLen = recordReader.ReadUInt16();
m_otherData = recordReader.ReadBytes(m_otherLen);
}
示例6: TKEYRecord
public TKEYRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_algorithm = recordReader.ReadDomainName();
m_inception = recordReader.ReadUInt32();
m_expiration = recordReader.ReadUInt32();
m_mode = recordReader.ReadUInt16();
m_error = recordReader.ReadUInt16();
m_keySize = recordReader.ReadUInt16();
m_keyData = recordReader.ReadBytes(m_keySize);
m_otherSize = recordReader.ReadUInt16();
m_otherData = recordReader.ReadBytes(m_otherSize);
}
示例7: ARecord
public ARecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_address = new IPAddress(recordReader.ReadBytes(4));
}
示例8: RecordDS
public RecordDS(RecordReader rr)
{
ushort length = rr.ReadUInt16(-2);
KEYTAG = rr.ReadUInt16();
ALGORITHM = rr.ReadByte();
DIGESTTYPE = rr.ReadByte();
length -= 4;
DIGEST = new byte[length];
DIGEST = rr.ReadBytes(length);
}
示例9: NSAPRecord
public NSAPRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_length = recordReader.ReadUInt16();
m_nsapAddress = recordReader.ReadBytes(m_length);
}
示例10: NULLRecord
public NULLRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
var count = recordReader.ReadUInt16(-1);
m_anything = recordReader.ReadBytes(count);
}
示例11: APLRecord
public APLRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
var count = recordReader.ReadUInt16(-2);
m_rdata = recordReader.ReadBytes(count);
}
示例12: RecordWKS
public RecordWKS(RecordReader rr)
{
ushort length = rr.ReadUInt16(-2);
ADDRESS = string.Format("{0}.{1}.{2}.{3}",
rr.ReadByte(),
rr.ReadByte(),
rr.ReadByte(),
rr.ReadByte());
PROTOCOL = (int)rr.ReadByte();
length -= 5;
BITMAP = new byte[length];
BITMAP = rr.ReadBytes(length);
}
示例13: NXTRecord
public NXTRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
var length = recordReader.ReadUInt16(-2);
m_nextDomainName = recordReader.ReadDomainName();
length -= (ushort)recordReader.Position;
m_bitmap = recordReader.ReadBytes(length);
}
示例14: DSRecord
public DSRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
var count = recordReader.ReadUInt16(-2);
m_keyTag = recordReader.ReadUInt16();
m_algorithm = recordReader.ReadByte();
m_digestType = recordReader.ReadByte();
count -= 4;
m_digest = recordReader.ReadBytes(count);
}
示例15: WKSRecord
public WKSRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
var length = recordReader.ReadUInt16(-2);
m_address = String.Format(
CultureInfo.InvariantCulture,
"{0}.{1}.{2}.{3}",
recordReader.ReadByte(),
recordReader.ReadByte(),
recordReader.ReadByte(),
recordReader.ReadByte());
m_protocol = (int)recordReader.ReadByte();
length -= 5;
m_bitmap = recordReader.ReadBytes(length);
}