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


C# IValueWriter.WriteString方法代码示例

本文整理汇总了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);
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:8,代码来源:LoginMessage.cs

示例2: 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

示例3: WritePayload

        public override void WritePayload(IValueWriter writerm)
        {
            writerm.WriteUInt32(this.NetworkID);
            writerm.WriteString(this.CharacterName);

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

示例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);
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:10,代码来源:ServerMovementMessage.cs

示例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);
     }
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:UserListMessage.cs

示例6: WritePayload

		public override void WritePayload (ISerializationContext context, IValueWriter writer)
		{
			writer.WriteString (Inviter);
			writer.Write (context, Group, GroupSerializer.Instance);
		}
开发者ID:ermau,项目名称:Tempest.Social,代码行数:5,代码来源:GroupInviteMessage.cs

示例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);
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:ServerInfo.cs

示例8: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteString (Password ?? String.Empty);
 }
开发者ID:HaKDMoDz,项目名称:Alloy,代码行数:4,代码来源:ConnectMessage.cs

示例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());
            }
        }
开发者ID:ermau,项目名称:Tempest,代码行数:15,代码来源:TypeMap.cs

示例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);
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:11,代码来源:UserInfo.cs

示例11: WritePayload

		public override void WritePayload (ISerializationContext context, IValueWriter writer)
		{
			writer.WriteString (Nickname);
		}
开发者ID:ermau,项目名称:Tempest.Social,代码行数:4,代码来源:SearchMessage.cs

示例12: WritePayload

 public override void WritePayload(ISerializationContext context, IValueWriter writer)
 {
     writer.WriteString (this.Name);
     AudioSettings.Serialize (context, writer);
 }
开发者ID:ermau,项目名称:Gablarski,代码行数:5,代码来源:RequestSourceMessage.cs

示例13: WritePayload

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

示例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);
        }
开发者ID:ermau,项目名称:Gablarski,代码行数:8,代码来源:SourceResultMessage.cs

示例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);
        }
开发者ID:ermau,项目名称:Tempest,代码行数:15,代码来源:ConnectMessage.cs


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