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


C# IValueReader.ReadInt32方法代码示例

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


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

示例1: ReadPayload

 public override void ReadPayload(IValueReader reader)
 {
     base.ReadPayload(reader);
     var internalEndPointAddress = new IPAddress(reader.ReadBytes());
     InternalOwnEndPoint = new IPEndPoint(internalEndPointAddress, reader.ReadInt32());
     var externalEndPointAddress = new IPAddress(reader.ReadBytes());
     ExternalPeerEndPoint = new IPEndPoint(externalEndPointAddress, reader.ReadInt32());
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:8,代码来源:RequestIntroducerIntroductionMessage.cs

示例2: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            int[] sourceIds = new int[reader.ReadInt32()];
            for (int i = 0; i < sourceIds.Length; ++i)
                sourceIds[i] = reader.ReadInt32();

            this.SourceIds = sourceIds;
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:8,代码来源:SourcesRemovedMessage.cs

示例3: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            int numUsers = reader.ReadInt32();
            IUser[] users = new IUser[numUsers];
            for (int i = 0; i < users.Length; ++i)
                users[i] = new User (reader.ReadInt32(), reader.ReadString());

            Users = users;
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:9,代码来源:UserListMessage.cs

示例4: Deserialize

        public void Deserialize(IValueReader reader)
        {
            this.NonCharacter = reader.ReadBool();
            this.PlayerID = reader.ReadInt32 ();

            int count = reader.ReadInt32 ();
            for(int i = 0; i < count; i++)
                this.path.Add ((Directions) reader.ReadInt32 ());
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:9,代码来源:ApplyMovementCommand.cs

示例5: ReadPayload

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

            this.X = reader.ReadInt32 ();
            this.Y = reader.ReadInt32 ();
            this.Direction = reader.ReadInt32 ();

            this.Animation = reader.ReadString ();
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:10,代码来源:ServerMovementMessage.cs

示例6: ReadPayload

        public override void ReadPayload(IValueReader reader)
        {
            int count = reader.ReadInt32 ();

            for(int i = 0; i < count; i++)
            {
                ScriptCommandType commandType = (ScriptCommandType) reader.ReadInt32 ();
                this.EventCommands.Add (this.ReadNextEvent (reader, commandType));
            }
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:10,代码来源:ServerEventMessage.cs

示例7: ReadEntity

        private NetworkEntity ReadEntity(ISerializationContext context, IValueReader reader)
        {
            var entity = new NetworkEntity (reader.ReadString (), EntityType.Client);
            entity.NetworkID = reader.ReadUInt32();

            int fieldCount = reader.ReadInt32 ();

            for (int f = 0; f < fieldCount; f++)
            {
                string name = reader.ReadString ();
                ushort typeID = reader.ReadUInt16();

                Type type;
                context.TypeMap.TryGetType (typeID, out type);

                object value;

                if (type == typeof (Vector2))
                    value = reader.Read (context, Vector2Serializer.Instance);
                else if (type == typeof (Vector3))
                    value = reader.Read (context, Vector3Serializer.Instance);
                else if (type == typeof (string))
                    value = reader.ReadString();
                else
                    value = reader.Read (context);

                entity.Fields.Add (name, new PropertyGroup (value, type));
            }

            return entity;
        }
开发者ID:strager,项目名称:Cinco,代码行数:31,代码来源:EntitySnapshotMessage.cs

示例8: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            AudioSource[] sourceInfos = new AudioSource[reader.ReadInt32()];
            for (int i = 0; i < sourceInfos.Length; ++i)
                sourceInfos[i] = new AudioSource (context, reader);

            this.Sources = sourceInfos;
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:8,代码来源:SourceListMessage.cs

示例9: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            if (reader.ReadBool())
            {
                string[] algs = new string[reader.ReadInt32()];
                for (int i = 0; i < algs.Length; ++i)
                    algs[i] = reader.ReadString();

                SignatureHashAlgorithms = algs;
            }

            Protocol[] protocols = new Protocol[reader.ReadInt32()];
            for (int i = 0; i < protocols.Length; ++i)
                protocols[i] = new Protocol (context, reader);

            Protocols = protocols;
        }
开发者ID:strager,项目名称:Tempest,代码行数:17,代码来源:ConnectMessage.cs

示例10: ReadPayload

		public override void ReadPayload (ISerializationContext context, IValueReader reader)
		{
			if (reader.ReadBool())
				SenderId = reader.ReadString();

			GroupId = reader.ReadInt32();
			Text = reader.ReadString();
		}
开发者ID:ermau,项目名称:Tempest.Social,代码行数:8,代码来源:TextMessage.cs

示例11: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            int entityCount = reader.ReadInt32 ();
            Entities = new List<SnapshotEntity>(entityCount);

            // Read in the entities
            for (int i = 0; i < entityCount; i++)
            {
                NetworkEntity entity = ReadEntity(context, reader);
                Entities.Add (new SnapshotEntity (entity, true));
            }
        }
开发者ID:NullSoldier,项目名称:Cinco,代码行数:12,代码来源:EntitySnapshotMessage.cs

示例12: Deserialize

            public void Deserialize(ISerializationContext context, IValueReader reader)
            {
                Name = reader.ReadString();

                Numbers = new int[reader.ReadInt32()];
                for (int i = 0; i < Numbers.Length; ++i)
                    Numbers[i] = reader.ReadInt32();
            }
开发者ID:ermau,项目名称:Tempest,代码行数:8,代码来源:ObjectSerializerTests.cs

示例13: ReadPayload

        public override void ReadPayload(ISerializationContext context, IValueReader reader)
        {
            this.Result = (GenericResult)reader.ReadByte();
            if (this.Result != GenericResult.Success)
                return;

            DefaultChannelId = reader.ReadInt32();

            int nchannels = reader.ReadInt32();
            this.channels = new List<ChannelInfo> (nchannels);
            for (int i = 0; i < nchannels; ++i)
                this.channels.Add (new ChannelInfo (context, reader));
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:13,代码来源:ChannelListMessage.cs

示例14: ReadPayload

 public override void ReadPayload(ISerializationContext context, IValueReader reader)
 {
     ConnectionId = reader.ReadInt32();
 }
开发者ID:ermau,项目名称:Tempest,代码行数:4,代码来源:ConnectedMessage.cs

示例15: ReadPayload

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


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