public void OnEvent(ref TNetMsg Msg)
        {
            var kind = GSocket.GetBufToByte(ref Msg.Value);

            switch (kind)
            {
            case SUCCESS:
                // 關閉效能監測工具,並儲存此次紀錄結果
                _monitorUnit.StopAndSaveToMonitorManager(true, "禮包碼兌換成功");
                Console.WriteLine($"{_monitorUnit.GetTag()}禮包碼兌換成功");
                break;

            case HTTP_FAILED:
                _monitorUnit.StopAndSaveToMonitorManager(false, "禮包碼兌換失敗");
                Console.WriteLine($"{_monitorUnit.GetTag()}禮包碼兌換失敗");
                break;

            case BAG_IS_FULL:
                _monitorUnit.StopAndSaveToMonitorManager(false, "背包已滿");
                Console.WriteLine($"{_monitorUnit.GetTag()}背包已滿");
                break;

            case ADD_PRIZE_FAILED:
                _monitorUnit.StopAndSaveToMonitorManager(false, "新增禮包碼到背包中失敗");
                Console.WriteLine($"{_monitorUnit.GetTag()}新增禮包碼到背包中失敗");
                break;
            }
        }
 /// <summary>
 /// Called when [activate result].
 /// </summary>
 /// <param name="httpStatusCode">The HTTP status code.</param>
 /// <param name="responseText">The response text.</param>
 private void OnActivateResult(HttpStatusCode httpStatusCode, string responseText)
 {
     if (httpStatusCode == HttpStatusCode.OK)
     {
         _monitor.StopAndSaveToMonitorManager(true, "OK");
     }
     else if (httpStatusCode == HttpStatusCode.BadRequest)
     {
         var responseMsg = JsonConvert.DeserializeObject <ResponseMessage>(responseText);
         _monitor.StopAndSaveToMonitorManager(false, $"{responseMsg.Message}");
     }
     else
     {
         _monitor.StopAndSaveToMonitorManager(false, $"其他HTTP問題: {httpStatusCode}");
     }
     Console.WriteLine("Finish One Task.");
 }