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


C# MessageStructure.ReadString方法代码示例

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


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

示例1: DecodePacket

 protected override bool DecodePacket(MessageStructure reader, MessageHead head)
 {
     _session.Context.SessionId = reader.ReadString();
     _session.Context.UserId = reader.ReadString().ToInt();
     int UserType = reader.ReadInt();
     string LoginTime = reader.ReadString();
     int GuideID = reader.ReadInt();
     if (GuideID == 1005)
     {
         SetChildStep("1005");
     }
     return true;
 }
开发者ID:GamesDesignArt,项目名称:UniversalCommon,代码行数:13,代码来源:Step1004.cs

示例2: SuccessCallback

 protected override void SuccessCallback(MessageStructure writer, MessageHead head)
 {
     int type = writer.ReadInt();
     if (type == 1)
     {
         int recordCount = writer.ReadInt();
         JsonObject jsonContainer = new JsonObject();
         List<JsonObject> jsonList = new List<JsonObject>();
         for (int i = 0; i < recordCount; i++)
         {
             writer.RecordStart();
             var item = new JsonObject();
             item.Add("NoticeID", writer.ReadString());
             item.Add("Title",  writer.ReadString());
             item.Add("Content", writer.ReadString());
             item.Add("IsBroadcast", writer.ReadInt());
             item.Add("IsTop", writer.ReadInt());
             item.Add("Creater", writer.ReadString());
             item.Add("CreateDate", writer.ReadString());
             item.Add("ExpiryDate", writer.ReadString());
             jsonList.Add(item);
             writer.RecordEnd();
         }
         jsonContainer.Add("total", recordCount);
         jsonContainer.Add("rows", jsonList.ToArray());
         WriteTableJson(jsonContainer);
     }
 }
开发者ID:0jpq0,项目名称:Scut,代码行数:28,代码来源:NoticeRemote.cs

示例3: GetFieldValue

        public static bool GetFieldValue(MessageStructure ms, FieldType fieldType, ref string val)
        {
            bool result = false;
            switch (fieldType)
            {
                case FieldType.Int:
                    val = ms.ReadInt().ToString();
                    result = true;
                    break;
                case FieldType.String:
                    val = ms.ReadString();
                    result = true;
                    break;
                case FieldType.Short:
                    val = ms.ReadShort().ToString();
                    result = true;
                    break;
                case FieldType.Byte:
                    val = ms.ReadByte().ToString();
                    result = true;
                    break;
                case FieldType.Long:
                    val = ms.ReadLong().ToString();
                    result = true;
                    break;
                case FieldType.Bool:
                    val = ms.ReadBool().ToString();
                    result = true;
                    break;
                case FieldType.Float:
                    val = ms.ReadFloat().ToString();
                    result = true;
                    break;
                case FieldType.Double:
                    val = ms.ReadDouble().ToString();
                    result = true;
                    break;
                case FieldType.Record:
                    break;
                case FieldType.End:
                    break;
                case FieldType.Head:
                    break;
                default:
                    break;
            }

            return result;
        }
开发者ID:huyanoperation,项目名称:Scut,代码行数:49,代码来源:NetHelper.cs

示例4: SuccessCallback

 protected override void SuccessCallback(MessageStructure writer, MessageHead head)
 {
     result = writer.ReadString();
 }
开发者ID:0jpq0,项目名称:Scut,代码行数:4,代码来源:PythonScript.cs


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