public static void Update()
        {
            List <AssetStoreClient.Pending> obj = AssetStoreClient.pending;

            lock (obj)
            {
                AssetStoreClient.pending.RemoveAll(delegate(AssetStoreClient.Pending p)
                {
                    if (p.conn == null)
                    {
                        if (p.queueDelegate == null)
                        {
                            DebugUtils.LogWarning("Invalid pending state while communicating with asset store");
                            return(true);
                        }
                        if (!p.queueDelegate() && p.conn == null)
                        {
                            return(false);
                        }
                        p.queueDelegate = null;
                    }
                    if (!p.conn.IsBusy)
                    {
                        if (p.ex == null && p.data == null)
                        {
                            if (p.binData == null)
                            {
                                goto IL_19F;
                            }
                        }
                        try
                        {
                            AssetStoreResponse job = AssetStoreClient.parseAssetStoreResponse(p.data, p.binData, p.ex, (p.conn != null) ? p.conn.ResponseHeaders : null);
                            if (AssetStoreManager.sDbg)
                            {
                                DebugUtils.Log(string.Concat(new string[]
                                {
                                    "Pending done: ",
                                    Thread.CurrentThread.ManagedThreadId.ToString(),
                                    " ",
                                    p.id,
                                    " ",
                                    job.data ?? "<nodata>"
                                }));
                                if (job.HttpHeaders != null && job.HttpHeaders.Get("X-Unity-Reason") != null)
                                {
                                    DebugUtils.LogWarning("X-Unity-Reason: " + job.HttpHeaders.Get("X-Unity-Reason"));
                                }
                            }
                            p.callback(job);
                        }
                        catch (Exception ex)
                        {
                            DebugUtils.LogError("Uncaught exception in async net callback: " + ex.Message);
                            DebugUtils.LogError(ex.StackTrace);
                        }
                        AssetStoreClient.ReleaseClient(p.conn);
                        p.conn = null;
                        return(true);
                    }
                    IL_19F:
                    if (p.progressCallback != null && p.statsUpdated)
                    {
                        p.statsUpdated = false;
                        double pctUp   = (p.totalBytesToSend <= 0)
                            ? 0
                            : p.bytesSend / p.totalBytesToSend * 100.0;

                        double pctDown = (p.totalBytesToReceive <= 0)
                            ? 0
                            : p.bytesReceived / p.totalBytesToReceive * 100.0;

                        try
                        {
                            p.progressCallback(pctUp, pctDown);
                        }
                        catch (Exception ex2)
                        {
                            DebugUtils.LogError("Uncaught exception in async net progress callback: " + ex2.Message);
                        }
                    }
                    return(false);
                });
            }
            AssetStoreClient.UpdateLargeFilesUpload();
        }