本文整理汇总了C#中IValueWriter.WriteString方法的典型用法代码示例。如果您正苦于以下问题:C# IValueWriter.WriteString方法的具体用法?C# IValueWriter.WriteString怎么用?C# IValueWriter.WriteString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueWriter
的用法示例。
在下文中一共展示了IValueWriter.WriteString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WritePayload
public override void WritePayload(IValueWriter writer)
{
if (String.IsNullOrEmpty (this.Password))
throw new InvalidOperationException ("Can not login without a password.");
writer.WriteString (Username);
writer.WriteString (Password);
}
示例2: WritePayload
public override void WritePayload (ISerializationContext context, IValueWriter writer)
{
if (writer.WriteBool (SenderId != null))
writer.WriteString (SenderId);
writer.WriteInt32 (GroupId);
writer.WriteString (Text);
}
示例3: WritePayload
public override void WritePayload(IValueWriter writerm)
{
writerm.WriteUInt32(this.NetworkID);
writerm.WriteString(this.CharacterName);
writerm.WriteByte((byte)this.Action);
}
示例4: 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);
}
示例5: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
var users = Users.ToList();
writer.WriteInt32 (users.Count);
for (int i = 0; i < users.Count; ++i)
{
var u = users[i];
writer.WriteInt32 (u.UserId);
writer.WriteString (u.Username);
}
}
示例6: WritePayload
public override void WritePayload (ISerializationContext context, IValueWriter writer)
{
writer.WriteString (Inviter);
writer.Write (context, Group, GroupSerializer.Instance);
}
示例7: Serialize
public void Serialize(ISerializationContext context, IValueWriter writer)
{
writer.WriteString (Name);
writer.WriteString (Description);
writer.WriteString (Logo);
writer.WriteBool (Passworded);
writer.WriteByte ((byte)RegistrationMode);
if (RegistrationMode != UserRegistrationMode.None)
writer.WriteString (RegistrationContent);
}
示例8: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
writer.WriteString (Password ?? String.Empty);
}
示例9: Serialize
public void Serialize(ISerializationContext context, IValueWriter writer)
{
if (this.map == null)
{
writer.WriteUInt16 (0);
return;
}
lock (this.sync)
{
writer.WriteUInt16 ((ushort)this.map.Count);
foreach (var kvp in this.map.OrderBy (kvp => kvp.Value))
writer.WriteString (kvp.Key.GetSimplestName());
}
}
示例10: 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);
}
示例11: WritePayload
public override void WritePayload (ISerializationContext context, IValueWriter writer)
{
writer.WriteString (Nickname);
}
示例12: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
writer.WriteString (this.Name);
AudioSettings.Serialize (context, writer);
}
示例13: WritePayload
public override void WritePayload (ISerializationContext context, IValueWriter writer)
{
writer.WriteInt32 (GroupId);
writer.WriteString (Invitee);
}
示例14: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
writer.WriteString (this.SourceName);
writer.WriteByte ((byte)this.SourceResult);
if (this.Source != null)
this.Source.Serialize (context, writer);
}
示例15: WritePayload
public override void WritePayload(ISerializationContext context, IValueWriter writer)
{
if (writer.WriteBool (SignatureHashAlgorithms != null))
{
string[] algs = SignatureHashAlgorithms.ToArray();
writer.WriteInt32 (algs.Length);
for (int i = 0; i < algs.Length; ++i)
writer.WriteString (algs[i]);
}
Protocol[] protocols = Protocols.ToArray();
writer.WriteInt32 (protocols.Length);
for (int i = 0 ; i < protocols.Length; ++i)
protocols[i].Serialize (context, writer);
}