コード例 #1
0
        private void GetTorrentsAndLabelsUpdate(TorrentsList TorrentsToProcess)
        {
            TorrentsAndLabels CurrentTorrents = ServiceClient.GetAllTorrentsAndLabels(_token);

            _torrents.Parse(CurrentTorrents.Torrents, false);
            _labels.Parse(CurrentTorrents.Labels);
            SetCache(CurrentTorrents.CacheID);
        }
コード例 #2
0
        private void GetTorrentsAndLabelsUpdate(TorrentsList TorrentsToProcess)
        {
            if (_token == null)
            {
                return;
            }

            try
            {
                TorrentsAndLabels CurrentTorrents = ServiceClient.GetAllTorrentsAndLabels(_token);

                _torrents.Parse(CurrentTorrents.Torrents, false);
                _labels.Parse(CurrentTorrents.Labels);
                SetCache(CurrentTorrents.CacheID);
            }
            catch (System.ServiceModel.ProtocolException e)
            {
                // Token possibly expired, get new token.
                Trace.TraceError(e.Message + e.StackTrace);
                GetToken();
            }
        }