/// <summary>
        /// Removes a playback from the list of ones to watch current times of.
        /// </summary>
        /// <param name="playback">Playback to exclude current time watching of.</param>
        /// <exception cref="ArgumentNullException"><paramref name="playback"/> is <c>null</c>.</exception>
        /// <exception cref="ObjectDisposedException">The current <see cref="PlaybackCurrentTimeWatcher"/>
        /// is disposed.</exception>
        public void RemovePlayback(Playback playback)
        {
            ThrowIfArgument.IsNull(nameof(playback), playback);
            EnsureIsNotDisposed();

            lock (_playbacksLock)
            {
                _playbacks.Remove(playback);

                if (!_playbacks.Any())
                {
                    RecreateClock();
                }
            }
        }
Пример #2
0
 internal PlaybackCurrentTime(Playback playback, ITimeSpan time)
 {
     Playback = playback;
     Time     = time;
 }