Пример #1
0
        private async void UpdateSpeed(object sender, EventArgs e)
        {
            InOutBytes total;

            using (await _lock.Lock())
            {
                try
                {
                    total = await _vpnServiceManager.Total();
                }
                catch (CommunicationException)
                {
                    return;
                }
                catch (TimeoutException)
                {
                    return;
                }
            }

            _speed = total - _total;
            _total = total;
        }
Пример #2
0
 public async Task <CachedProfileData> LockedProfileData()
 {
     return(new CachedProfileData(_appSettings, await _accessQueue.Lock()));
 }