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


C# IValueReader.ReadByte方法代码示例

本文整理汇总了C#中IValueReader.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# IValueReader.ReadByte方法的具体用法?C# IValueReader.ReadByte怎么用?C# IValueReader.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IValueReader的用法示例。


在下文中一共展示了IValueReader.ReadByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadPayload

        public override void ReadPayload(IValueReader reader)
        {
            this.NetworkID = reader.ReadUInt32();
            this.CharacterName = reader.ReadString();

            this.Action = (PlayerUpdateAction)reader.ReadByte();
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:7,代码来源:PlayerUpdateMessage.cs

示例2: ReadState

        /// <summary>
        /// Reads the state of the object from an <see cref="IValueReader"/>. Values should be read in the exact
        /// same order as they were written.
        /// </summary>
        /// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param>
        public void ReadState(IValueReader reader)
        {
            PersistableHelper.Read(this, reader);

            // Equipped bodies

            int count = reader.ReadByte("EquippedBodiesCount");
            _equippedBodies.Clear();

            for (var i = 0; i < count; i++)
            {
                var s = reader.ReadString("EquippedBody_" + i);
                _equippedBodies.Add(s);
            }
        }
开发者ID:wtfcolt,项目名称:game,代码行数:20,代码来源:AccountCharacterInfo.cs

示例3: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     Result = (ConnectResult)reader.ReadByte();
     KeyboardEncryption = reader.ReadBool();
     MouseEncryption = reader.ReadBool();
 }
开发者ID:HaKDMoDz,项目名称:Alloy,代码行数:6,代码来源:ConnectResultMessage.cs

示例4: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     Reason = (ConnectionResult)reader.ReadByte();
     if (Reason == ConnectionResult.Custom)
         CustomReason = reader.ReadString();
 }
开发者ID:ermau,项目名称:Tempest,代码行数:6,代码来源:DisconnectMessage.cs

示例5: Deserialize

 public void Deserialize(ISerializationContext context, IValueReader reader)
 {
     UserId = reader.ReadInt32();
     Username = reader.ReadString();
     CurrentChannelId = reader.ReadInt32();
     Nickname = reader.ReadString();
     Phonetic = reader.ReadString();
     IsMuted = reader.ReadBool();
     Status = (UserStatus)reader.ReadByte();
     Comment = reader.ReadString();
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:UserInfo.cs

示例6: Read

            /// <summary>
            /// Reads a <see cref="QuickBarSlotValues"/> from an <see cref="IValueReader"/>.
            /// </summary>
            /// <param name="r">The <see cref="IValueReader"/> to read the values from.</param>
            /// <returns>The <see cref="QuickBarSlotValues"/> read from the <paramref name="r"/>.</returns>
            public static QuickBarSlotValues Read(IValueReader r)
            {
                var slot = r.ReadByte("Slot");
                var type = r.ReadEnum<QuickBarItemType>("Type");
                var value = r.ReadInt("Value");

                return new QuickBarSlotValues(slot, type, value);
            }
开发者ID:mateuscezar,项目名称:netgore,代码行数:13,代码来源:QuickBarForm.cs

示例7: ReadPayload

		public override void ReadPayload (ISerializationContext context, IValueReader reader)
		{
			GroupId = reader.ReadInt32();
			Response = (InvitationResponse)reader.ReadByte();
		}
开发者ID:ermau,项目名称:Tempest.Social,代码行数:5,代码来源:GroupInviteResponseMessage.cs

示例8: Deserialize

        public void Deserialize(ISerializationContext context, IValueReader reader)
        {
            Name = reader.ReadString();
            Description = reader.ReadString();
            Logo = reader.ReadString();
            Passworded = reader.ReadBool();
            RegistrationMode = (UserRegistrationMode)reader.ReadByte();

            if (RegistrationMode != UserRegistrationMode.None)
                RegistrationContent = reader.ReadString();
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:ServerInfo.cs

示例9: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     OriginalMessageId = reader.ReadUInt16();
     Count = reader.ReadByte();
     Payload = reader.ReadBytes();
 }
开发者ID:ermau,项目名称:Tempest,代码行数:6,代码来源:PartialMessage.cs

示例10: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            SourceId = reader.ReadInt32 ();
            Sequence = reader.ReadInt32();

            byte frames = reader.ReadByte();
            Data = new byte[frames][];

            for (int i = 0; i < frames; ++i)
                Data[i] = reader.ReadBytes();
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:ServerAudioDataMessage.cs

示例11: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            this.SourceName = reader.ReadString ();
            this.SourceResult = (SourceResult)reader.ReadByte ();

            switch (this.SourceResult)
            {
                case Messages.SourceResult.NewSource:
                case Messages.SourceResult.SourceRemoved:
                case Messages.SourceResult.Succeeded:
                    this.Source = new AudioSource (context, reader);
                    break;
            }
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:14,代码来源:SourceResultMessage.cs

示例12: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            this.TargetType = (TargetType)reader.ReadByte();

            ushort numTargets = reader.ReadUInt16();
            int[] targets = new int[numTargets];
            for (int i = 0; i < targets.Length; ++i)
                targets[i] = reader.ReadInt32();

            TargetIds = targets;

            Sequence = reader.ReadInt32();
            SourceId = reader.ReadInt32();

            byte frames = reader.ReadByte();
            Data = new byte[frames][];

            for (int i = 0; i < frames; ++i)
                Data[i] = reader.ReadBytes();
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:20,代码来源:ClientAudioDataMessage.cs

示例13: Deserialize

 public void Deserialize(ISerializationContext context, IValueReader reader)
 {
     this.UserId = reader.ReadInt32();
     this.ResultState = (LoginResultState)reader.ReadByte ();
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:5,代码来源:LoginResult.cs

示例14: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     this.Result = (ChannelChangeResult)reader.ReadByte ();
     this.MoveInfo = new ChannelChangeInfo (context, reader);
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:5,代码来源:ChannelChangeResultMessage.cs

示例15: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     Mode = (UserListMode) reader.ReadByte();
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:4,代码来源:RequestUserListMessage.cs


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