private static void OnSyncUser(bool success, System.Object content)
 {
     if (success)
     {
         PBConnect_readNotify.DelegateConnectCallback cb = _callback;
         _callback = null;
         cb(success, content);
     }
     else
     {
         PBConnect_readNotify.DelegateConnectCallback cb = _callback;
         _callback = null;
         cb(success, content);
     }
 }
    private static void OnReadNotification(bool success, System.Object content)
    {
        if (success)
        {
            SyncRequest request = new SyncRequest();
            request.api = new Model_ApiRequest().api;

            PBConnect_sync.FillSyncRequest(dropPrizeItems, request);

            (new PBConnect_sync()).Send(request, OnSyncUser);
        }
        else
        {
            PBConnect_readNotify.DelegateConnectCallback cb = _callback;
            _callback = null;
            cb(success, content);
        }
    }
    public static RESULT ReadNotification(int[] ids, PBConnect_readNotify.DelegateConnectCallback callback)
    {
        RESULT r = Check(ids);

        if (r != RESULT.OK)
        {
            return(r);
        }

        Assert.assert(_callback == null);
        _callback = callback;

        ReadNotifyRequest request = new ReadNotifyRequest();

        request.api = (new Model_ApiRequest()).api;

        ListHelper.Push <int> (request.notifyIds, ids);

        (new PBConnect_readNotify()).Send(request, OnReadNotification);

        return(r);
    }