本文整理汇总了C#中RecordReader.ReadUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# RecordReader.ReadUInt32方法的具体用法?C# RecordReader.ReadUInt32怎么用?C# RecordReader.ReadUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecordReader
的用法示例。
在下文中一共展示了RecordReader.ReadUInt32方法的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: ReadMetaData
public override void ReadMetaData(RecordReader reader)
{
if (Signature == "GRUP")
{
throw new InvalidOperationException("Group signature was not expected now");
}
Length = reader.ReadUInt32();
Flags = reader.ReadUInt32();
FormId = reader.ReadUInt32();
Revision = reader.ReadUInt32();
Version = reader.ReadUInt16();
Unknown = reader.ReadUInt16();
}
示例4: SOARecord
public SOARecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_mName = recordReader.ReadDomainName();
m_rName = recordReader.ReadDomainName();
m_serial = recordReader.ReadUInt32();
m_refresh = recordReader.ReadUInt32();
m_retry = recordReader.ReadUInt32();
m_expire = recordReader.ReadUInt32();
m_minimum = recordReader.ReadUInt32();
}
示例5: LOCRecord
public LOCRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_version = recordReader.ReadByte(); // must be 0!
m_size = recordReader.ReadByte();
m_horizPre = recordReader.ReadByte();
m_vertPre = recordReader.ReadByte();
m_latitude = recordReader.ReadUInt32();
m_longitude = recordReader.ReadUInt32();
m_altitude = recordReader.ReadUInt32();
}
示例6: SIGRecord
public SIGRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_typeCovered = recordReader.ReadUInt16();
m_algorithm = recordReader.ReadByte();
m_labels = recordReader.ReadByte();
m_originalTtl = recordReader.ReadUInt32();
m_signatureExpiration = recordReader.ReadUInt32();
m_signatureInception = recordReader.ReadUInt32();
m_keyTag = recordReader.ReadUInt16();
m_signersName = recordReader.ReadDomainName();
m_signature = recordReader.ReadString();
}
示例7: 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);
}
示例8: 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);
}
示例9: ReadMetaData
public override void ReadMetaData(RecordReader reader)
{
if (Signature == "XXXX")
{
// Segment length is always 4 which not interesting so skip 2 bytes
reader.Seek(2);
// Read lenght of the next segment
uint nextSegmentLength = reader.ReadUInt32();
// Load the actual signature (segment after XXXX)
Signature = reader.ReadStringFixedLength(4);
// Length is ZERO so skip 2 bytes and use value from the previous segment
reader.Seek(2);
Length = nextSegmentLength;
}
else
{
Length = reader.ReadUInt16();
}
}
示例10: ReadField
internal override void ReadField(RecordReader reader)
{
// Read flags and skip 3 bytes
Flags = (ConditionFlags)reader.ReadByte();
reader.Seek(3);
// Read either global variable reference or float
if (Flags.HasFlag(ConditionFlags.UseGlobal))
Operand.GlobalVariable = reader.ReadReference(FormKindSet.GlobOnly);
else
Operand.FloatValue = reader.ReadSingle();
// Read function code and skip 2 bytes
Function = (Function)reader.ReadUInt16();
reader.Seek(2);
// Warn if unknown function - no enum value is defined for it
if (!Enum.IsDefined(typeof(Function), Function))
Log.Warning("Function '{0}' was not recorgnised and any of parameter references may have may get scrambled.", Function);
// Find function signature
var signature = SignatureProvider.Default.GetSignature(Function);
// Read function params
// References must be read with ReadReference function
if (signature[0].IsReference)
Params.UInt32_0 = reader.ReadReference(signature[0].Reference);
else
Params.Int32_0 = reader.ReadInt32();
if (signature[1].IsReference)
Params.UInt32_1 = reader.ReadReference(signature[1].Reference);
else
Params.Int32_1 = reader.ReadInt32();
Target = (FunctionTarget)reader.ReadUInt32();
TargetReference = reader.ReadReference(FormKindSet.Any);
// Third parameter
IntParam3 = reader.ReadInt32();
}
示例11: ReadMetaData
public override void ReadMetaData(RecordReader reader)
{
if (Signature != "GRUP")
{
throw new InvalidOperationException("Signature GRUP was expected");
}
Length = reader.ReadUInt32() - 24;
properties = new GroupPropertiesUnion() { FormId = reader.ReadUInt32() };
GroupType = (GroupType)reader.ReadUInt32();
Day = reader.ReadByte();
TotalMonths = reader.ReadByte();
Unknown1 = reader.ReadUInt16();
Version = reader.ReadUInt16();
Unknown2 = reader.ReadUInt16();
// Covert properties to FormType
if (GroupType == GroupType.Top)
FormKind = (FormKind)Encoding.UTF8.GetString(BitConverter.GetBytes(properties.FormId));
}
示例12: ReadField
internal override void ReadField(RecordReader reader)
{
Version = reader.ReadSingle();
NumRecords = reader.ReadInt32();
NextFormId = reader.ReadUInt32();
}
示例13: RecordSOA
public RecordSOA(RecordReader rr)
{
MNAME = rr.ReadDomainName();
RNAME = rr.ReadDomainName();
SERIAL = rr.ReadUInt32();
REFRESH = rr.ReadUInt32();
RETRY = rr.ReadUInt32();
EXPIRE = rr.ReadUInt32();
MINIMUM = rr.ReadUInt32();
}
示例14: ReadField
internal override void ReadField(RecordReader reader)
{
BodyParts = (BodyParts)reader.ReadUInt32();
SkillUsage = (ArmorSkillUsage)reader.ReadInt32();
}
示例15: ReadField
internal override void ReadField(RecordReader reader)
{
Magnitude = reader.ReadSingle();
Area = reader.ReadUInt32();
Duration = reader.ReadUInt32();
}