示例#1
0
 public void HandleShareNofify(ShareRet ret)
 {
     try {
         if (ShareEvent != null)
         {
             ShareEvent(ret);
         }
     } catch (Exception e) {
         Debug.LogError(e.Message);
     }
 }
示例#2
0
 /// <summary>
 /// 解析json串,返回一个ShareRet,若解析失败返回null.
 /// </summary>
 /// <returns>The json.</returns>
 /// <param name="json">Json.</param>
 public static ShareRet ParseJson(string json)
 {
     try{
         ShareRet ret = JsonMapper.ToObject <ShareRet>(json);
         return(ret);
     }catch (Exception ex)
     {
         Debug.Log("errro:" + ex.Message + "\n" + ex.StackTrace);
     }
     return(null);
 }
示例#3
0
        public void OnShareNotify(string jsonRet)
        {
            ShareRet ret = ShareRet.ParseJson(jsonRet);

            MsdkEvent.Instance.HandleShareNofify(ret);
        }