示例#1
0
 private void OnQueryGroupKeyNotify(string msg)
 {
     ADebug.Log("OnQueryGroupKeyNotify");
     if (msg.get_Length() > 0)
     {
         ApolloStringParser apolloStringParser = new ApolloStringParser(msg);
         ApolloGroupResult  @object            = apolloStringParser.GetObject <ApolloGroupResult>("GroupResult");
         if (this.onQueryGroupKeyEvent != null)
         {
             try
             {
                 this.onQueryGroupKeyEvent(@object);
             }
             catch (Exception ex)
             {
                 ADebug.Log("OnQueryGroupKeyNotify:" + ex);
             }
         }
     }
 }
示例#2
0
 private void OnBindGroupNotify(string msg)
 {
     ADebug.Log("OnBindGroupNotify");
     if (msg.Length > 0)
     {
         ApolloStringParser parser   = new ApolloStringParser(msg);
         ApolloGroupResult  groupRet = null;
         groupRet = parser.GetObject <ApolloGroupResult>("GroupResult");
         if (this.onBindGroupEvent != null)
         {
             try
             {
                 this.onBindGroupEvent(groupRet);
             }
             catch (Exception exception)
             {
                 ADebug.Log("OnBindGroupNotify:" + exception);
             }
         }
     }
 }
 private void OnJoinWXGroupNotify(byte[] data)
 {
     if (data.Length > 0)
     {
         ApolloGroupResult apolloGroupResult = new ApolloGroupResult();
         if (!apolloGroupResult.Decode(data))
         {
             ADebug.Log("OnJoinWXGroupNotify Decode failed");
         }
         if (this.onJoinWXGroupEvent != null)
         {
             try
             {
                 this.onJoinWXGroupEvent(apolloGroupResult);
             }
             catch (Exception ex)
             {
                 ADebug.Log("OnJoinWXGroupNotify:" + ex);
             }
         }
     }
 }