本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例5: WritePayload
public override void WritePayload (ISerializationContext context, IValueWriter writer)
{
if (writer.WriteBool (SenderId != null))
writer.WriteString (SenderId);
writer.WriteInt32 (GroupId);
writer.WriteString (Text);
}
示例6: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
writer.WriteInt32 (Entities.Count);
foreach (SnapshotEntity sentity in Entities)
{
WriteEntity (sentity.Entity, context, writer);
}
}
示例7: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
writer.WriteBool (this.Unmuted);
writer.WriteInt32 (this.SourceId);
}
示例8: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
writer.WriteBool (FromServer);
writer.WriteInt32 (UserId);
}
示例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);
}
示例10: Serialize
internal void Serialize(IValueWriter writer)
{
writer.WriteInt32 (this.UserId);
writer.WriteByte ((byte)this.ResultState);
}
示例11: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
writer.WriteString (Message);
writer.WriteInt32 (Number);
}
示例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);
}
示例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);
}
示例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);
}
示例15: Serialize
public void Serialize(ISerializationContext context, IValueWriter writer)
{
if (!writer.WriteBool (this.publicKey != null))
return;
writer.WriteBytes (this.publicKey);
writer.WriteInt32 (this.exponentOffset);
}