當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。