本文整理汇总了C#中RecordReader.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# RecordReader.ReadByte方法的具体用法?C# RecordReader.ReadByte怎么用?C# RecordReader.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RecordReader
的用法示例。
在下文中一共展示了RecordReader.ReadByte方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RecordKEY
public RecordKEY(RecordReader rr)
{
FLAGS = rr.ReadUInt16();
PROTOCOL = rr.ReadByte();
ALGORITHM = rr.ReadByte();
PUBLICKEY = rr.ReadString();
}
示例2: RecordA
///<summary>
///</summary>
///<param name="rr"></param>
public RecordA(RecordReader rr)
{
IPAddress.TryParse(string.Format("{0}.{1}.{2}.{3}",
rr.ReadByte(),
rr.ReadByte(),
rr.ReadByte(),
rr.ReadByte()), out Address);
}
示例3: 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);
}
示例4: KEYRecord
public KEYRecord(RR rr, RecordReader recordReader)
: base(rr)
{
if (recordReader == null)
{
throw new ArgumentNullException("recordReader");
}
m_flags = recordReader.ReadUInt16();
m_protocol = recordReader.ReadByte();
m_algorithm = recordReader.ReadByte();
m_publicKey = recordReader.ReadString();
}
示例5: 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);
}
示例6: 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);
}
示例7: 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();
}
示例8: 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();
}
示例9: 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);
}
示例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: RecordSIG
///<summary>
///</summary>
///<param name="rr"></param>
public RecordSIG(RecordReader rr)
{
TypeCovered = rr.ReadUInt16();
Algorithm = rr.ReadByte();
Labels = rr.ReadByte();
OriginalTTL = rr.ReadUInt32();
SignatureExpiration = rr.ReadUInt32();
SignatureInception = rr.ReadUInt32();
Keytag = rr.ReadUInt16();
SignersName = rr.ReadDomainName();
Signature = rr.ReadString();
}
示例13: ReadField
internal override void ReadField(RecordReader reader)
{
WeaponType = (WeaponType)(reader.ReadInt32() & 0xFF);
Speed = reader.ReadSingle();
Reach = reader.ReadSingle();
Flags = (WeaponFlags)reader.ReadUInt16();
Unknown1 = reader.ReadUInt16();
SightFov = reader.ReadSingle();
Unknown2 = reader.ReadSingle();
VatsToHitChance = reader.ReadByte();
AttackAnimation = (AttackAnimation)reader.ReadByte();
Projectiles = reader.ReadByte();
EmbeddedWeapon = reader.ReadByte();
MinRange = reader.ReadSingle();
MaxRange = reader.ReadSingle();
OnHitBehavior = (OnHitBehavior)reader.ReadUInt32();
Flags2 = (WeaponFlags2)reader.ReadUInt32();
AttackAnimationMultiplier = reader.ReadSingle();
Unknown3 = reader.ReadSingle();
RumbleLeftMotorStrength = reader.ReadSingle();
RumbleRightMotosStrength = reader.ReadSingle();
RumbleDuration = reader.ReadSingle();
Unknown4 = reader.ReadUInt32();
Unknown5 = reader.ReadUInt32();
Unknown6 = reader.ReadUInt32();
Skill = (ActorValue)reader.ReadInt32();
Unknown7 = reader.ReadUInt32();
Unknown8 = reader.ReadUInt32();
Resist = (ActorValue)reader.ReadInt32();
Unknown9 = reader.ReadUInt32();
Stagger = reader.ReadSingle();
}
示例14: RecordLOC
public RecordLOC(RecordReader rr)
{
VERSION = rr.ReadByte(); // must be 0!
SIZE = rr.ReadByte();
HORIZPRE = rr.ReadByte();
VERTPRE = rr.ReadByte();
LATITUDE = rr.ReadUInt32();
LONGITUDE = rr.ReadUInt32();
ALTITUDE = rr.ReadUInt32();
}