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


C# IValueWriter.WriteInt32方法代码示例

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


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

示例1: WritePayload

 public override void WritePayload(IValueWriter writer)
 {
     base.WritePayload(writer);
     writer.WriteBytes(InternalOwnEndPoint.Address.GetAddressBytes());
     writer.WriteInt32(InternalOwnEndPoint.Port);
     writer.WriteBytes(ExternalPeerEndPoint.Address.GetAddressBytes());
     writer.WriteInt32(ExternalPeerEndPoint.Port);
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:8,代码来源:RequestIntroducerIntroductionMessage.cs

示例2: Serialize

        public void Serialize(IValueWriter writer)
        {
            writer.WriteBool (this.NonCharacter);
            writer.WriteInt32 (this.PlayerID);

            writer.WriteInt32 (this.path.Count);
            foreach(Directions dir in this.path)
                writer.WriteInt32 ((int) dir);
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:9,代码来源:ApplyMovementCommand.cs

示例3: WritePayload

        public override void WritePayload(IValueWriter writer)
        {
            writer.WriteUInt32 (this.NetworkID);

            writer.WriteInt32 (this.X);
            writer.WriteInt32 (this.Y);
            writer.WriteInt32 (this.Direction);

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

示例4: WritePayload

        public override void WritePayload(IValueWriter writer)
        {
            writer.WriteInt32 (this.EventCommands.Count);

            foreach(IEventCommand command in this.EventCommands)
            {
                writer.WriteInt32 ((int) command.Command);
                command.Serialize (writer);
            }
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:10,代码来源:ServerEventMessage.cs

示例5: WritePayload

		public override void WritePayload (ISerializationContext context, IValueWriter writer)
		{
			if (writer.WriteBool (SenderId != null))
				writer.WriteString (SenderId);

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

示例6: WritePayload

        public override void WritePayload(ISerializationContext context, IValueWriter writer)
        {
            writer.WriteInt32 (Entities.Count);

            foreach (SnapshotEntity sentity in Entities)
            {
                WriteEntity (sentity.Entity, context, writer);
            }
        }
开发者ID:NullSoldier,项目名称:Cinco,代码行数:9,代码来源:EntitySnapshotMessage.cs

示例7: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteBool (this.Unmuted);
     writer.WriteInt32 (this.SourceId);
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:5,代码来源:SourceMutedMessage.cs

示例8: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteBool (FromServer);
     writer.WriteInt32 (UserId);
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:5,代码来源:UserKickedMessage.cs

示例9: WritePayload

        public override void WritePayload(ISerializationContext context, IValueWriter writer)
        {
            writer.WriteString (SignatureHashAlgorithm);

            Protocol[] protocols = EnabledProtocols.ToArray();
            writer.WriteInt32 (protocols.Length);
            for (int i = 0; i < protocols.Length; ++i)
                protocols[i].Serialize (context, writer);

            writer.WriteInt32 (ConnectionId);

            writer.WriteString (PublicEncryptionKey.GetType().GetSimplestName());
            PublicEncryptionKey.Serialize (context, writer);
            writer.WriteString (PublicAuthenticationKey.GetType().GetSimplestName());
            PublicAuthenticationKey.Serialize (context, writer);
        }
开发者ID:ermau,项目名称:Tempest,代码行数:16,代码来源:AcknowledgeConnectMessage.cs

示例10: Serialize

 internal void Serialize(IValueWriter writer)
 {
     writer.WriteInt32 (this.UserId);
     writer.WriteByte ((byte)this.ResultState);
 }
开发者ID:NullSoldier,项目名称:Valkyrie,代码行数:5,代码来源:LoginResult.cs

示例11: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteString (Message);
     writer.WriteInt32 (Number);
 }
开发者ID:ermau,项目名称:Tempest,代码行数:5,代码来源:MockMessage.cs

示例12: WritePayload

        public override void WritePayload(ISerializationContext context, IValueWriter writer)
        {
            writer.WriteByte ((byte)Result);
            if (this.Result != GenericResult.Success)
                return;

            writer.WriteInt32 (DefaultChannelId);

            writer.WriteInt32 (this.Channels.Count ());
            foreach (var c in this.channels)
                c.Serialize (context, writer);
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:12,代码来源:ChannelListMessage.cs

示例13: Serialize

 public void Serialize(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteInt32 (UserId);
     writer.WriteString (Username);
     writer.WriteInt32 (CurrentChannelId);
     writer.WriteString (Nickname);
     writer.WriteString (Phonetic);
     writer.WriteBool (IsMuted);
     writer.WriteByte ((byte)Status);
     writer.WriteString (Comment);
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:UserInfo.cs

示例14: WritePayload

 /// <summary>
 /// Writes the message payload with <paramref name="writer"/>.
 /// </summary>
 /// <param name="writer">The writer to use for writing the payload.</param>
 /// <exception cref="ArgumentNullException"><paramref name="writer"/> is <c>null</c>.</exception>
 public virtual void WritePayload(IValueWriter writer)
 {
     writer.WriteInt32((int) MessageType);
 }
开发者ID:dishiyicijinqiu,项目名称:tcp-holepunching,代码行数:9,代码来源:MessageBase.cs

示例15: Serialize

        public void Serialize(ISerializationContext context, IValueWriter writer)
        {
            if (!writer.WriteBool (this.publicKey != null))
                return;

            writer.WriteBytes (this.publicKey);
            writer.WriteInt32 (this.exponentOffset);
        }
开发者ID:morpheusllc,项目名称:Tempest,代码行数:8,代码来源:RSAAsymmetricKey.cs


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