コード例 #1
0
        private async Task UpdateAction()
        {
            while (true)
            {
                try
                {
                    using (PlayingInfo currentInfo = await GetCurrent())
                        if (!Object.Equals(currentInfo, _prevInfo))
                        {
                            _prevInfo = currentInfo;
                            PlayingInfoChanged?.Invoke(this, new PlayingEventArgs(currentInfo));
                        }

                    await Task.Delay(UpdateTimeoutMs);

                    await _updateSync.WaitAsync();
                }
                catch
                {
                    // doesn't matter if we got an exception here.
                }
            }
        }
コード例 #2
0
ファイル: GpmdpService.cs プロジェクト: tihilv/Vkm
 private void ProviderOnPlayingInfoChanged(object sender, PlayingEventArgs e)
 {
     PlayingInfoChanged?.Invoke(this, e);
 }