当前位置: 首页>>代码示例>>C#>>正文


C# RecordReader.ReadByte方法代码示例

本文整理汇总了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();
 }
开发者ID:sstraus,项目名称:xmpp,代码行数:7,代码来源:RecordKEY.cs

示例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);
 }
开发者ID:sstraus,项目名称:xmpp,代码行数:11,代码来源:RecordA.cs

示例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);
 }
开发者ID:sstraus,项目名称:xmpp,代码行数:10,代码来源:RecordDS.cs

示例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();
        }
开发者ID:atanasmihaylov,项目名称:lanscan,代码行数:13,代码来源:KEYRecord.cs

示例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);
 }
开发者ID:sstraus,项目名称:xmpp,代码行数:13,代码来源:RecordWKS.cs

示例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);
        }
开发者ID:atanasmihaylov,项目名称:lanscan,代码行数:15,代码来源:DSRecord.cs

示例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();
        }
开发者ID:atanasmihaylov,项目名称:lanscan,代码行数:16,代码来源:LOCRecord.cs

示例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();
        }
开发者ID:atanasmihaylov,项目名称:lanscan,代码行数:18,代码来源:SIGRecord.cs

示例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);
        }
开发者ID:atanasmihaylov,项目名称:lanscan,代码行数:20,代码来源:WKSRecord.cs

示例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();
            }
开发者ID:unforbidable,项目名称:patcher,代码行数:41,代码来源:Condition.cs

示例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));
        }
开发者ID:unforbidable,项目名称:patcher,代码行数:20,代码来源:GroupMetadata.cs

示例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();
 }
开发者ID:sstraus,项目名称:xmpp,代码行数:15,代码来源:RecordSIG.cs

示例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();
 }
开发者ID:unforbidable,项目名称:patcher,代码行数:32,代码来源:Weap.cs

示例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();
 }
开发者ID:sstraus,项目名称:xmpp,代码行数:10,代码来源:RecordLOC.cs


注:本文中的RecordReader.ReadByte方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。