//写小解析
 public static void sWriteFileSmallType_Lua(StringBuilder sb, Dictionary <string, CmdBigTypeData> cmdbigTypeList)
 {
     foreach (KeyValuePair <string, CmdBigTypeData> iterType in cmdbigTypeList)
     {
         CmdBigTypeData bigType = iterType.Value;
         sb.AppendLine();
         string targetFun = "function " + LuaHandler + ".Parse{0}(gsCmd,gsParam,msgBytes)";
         sb.AppendLine(string.Format(targetFun, bigType.mCmdClassName));
         sb.AppendLine("\t\t\tif gsCmd == nil then");
         for (int j = 0; j < bigType.mAllSubData.Count; ++j)
         {
             CmdSmallTypeData subType = bigType.mAllSubData[j];
             if (!subType.isNeedLua)
             {
                 continue;
             }
             string targetDefine = "\t\t\telseif gsParam == {0}_S.{1} then ";
             sb.AppendLine(string.Format(targetDefine, subType.mGsClassName, subType.mGsParamName));
             string targetHandler = "\t\t\t\t{0}_Handler.{1}(msgBytes);";
             sb.AppendLine(string.Format(targetHandler, subType.mGsClassName, CmdXmlParser.cmdHandlerFuncName));
         }
         sb.AppendLine("\t\t\tend");
         sb.AppendLine("end");
     }
 }
 //写小解析
 public static void sWriteFileSmallType(StringBuilder sb, Dictionary <string, CmdBigTypeData> cmdbigTypeList)
 {
     foreach (KeyValuePair <string, CmdBigTypeData> iterType in cmdbigTypeList)
     {
         CmdBigTypeData bigType = iterType.Value;
         //判断是否生成C#的handle文件中
         if (!bigType.mIsCS)
         {
             continue;
         }
         sb.AppendLine();
         string targetFun = "\tstatic void Parse{0}(byte gsCmd, byte gsParamType, byte[] msg)";
         sb.AppendLine(string.Format(targetFun, bigType.mCmdClassName));
         sb.AppendLine("\t{");
         sb.AppendLine("\t\tswitch (gsParamType)");
         sb.AppendLine("\t\t{");
         for (int j = 0; j < bigType.mAllSubData.Count; ++j)
         {
             CmdSmallTypeData subType = bigType.mAllSubData[j];
             //判断是否生成C#的handle文件中
             if (!subType.mIsCS)
             {
                 continue;
             }
             string targetDefine = "\t\t\tcase {0}_S.{1}:";
             sb.AppendLine(string.Format(targetDefine, subType.mGsClassName, subType.mGsParamName));
             string targetHandler = "\t\t\t\t{0}_Handler.{1}(msg);";
             sb.AppendLine(string.Format(targetHandler, subType.mGsClassName, CmdXmlParser.cmdHandlerFuncName));
             sb.AppendLine("\t\t\t\tbreak;");
         }
         sb.AppendLine("\t\t\tdefault : ");
         sb.AppendLine("\t\t\t\t//C#没有此消息的处理方法,尝试让Lua处理");
         sb.AppendLine("\t\t\t\tLuaTool.Instance.CallFunction(\"NetCmdLuaHandler.HandleCommond\", gsCmd, gsParamType, msg);");
         sb.AppendLine("\t\t\t\tbreak;");
         sb.AppendLine("\t\t}");
         sb.AppendLine("\t}");
     }
 }
 public List <CmdSmallTypeData> mAllSubData = new List <CmdSmallTypeData>();       //此父消息下存在的所有子消息,方便生成总的handle文件
 public void AddSubSmallType(CmdSmallTypeData smallType)
 {
     mAllSubData.Add(smallType);
 }