public void Reset()
        {
            Debug.WriteLine("SmtcMetadataHandler.Reset()");

            lock (_lock)
            {
                _title  = null;
                _artist = null;
                _metadataSink.Reset();
                _lastReport = TimeSpan.Zero;
            }

            _updateTask.Fire();
        }
        public void Submit(ValueSet valueSet)
        {
            int count;

            lock (_queue)
            {
                count = _queue.Count;

                _queue.Enqueue(valueSet);
            }

            if (0 == count)
            {
                _signalTask.Fire();
            }
        }
Пример #3
0
 private void SetMediaState(MediaManagerState state, string message)
 {
     lock (_lock)
     {
         if (state == _mediaState)
         {
             return;
         }
         Debug.WriteLine("SmMediaManager.SetMediaState() {0} -> {1}", _mediaState, state);
         _mediaState = state;
         if (null != message)
         {
             _mediaStateMessage = message;
         }
     }
     _reportStateTask.Fire();
 }
        public void Notify(ValueSet valueSet)
        {
            valueSet.Add(BackgroundNotificationType.Id, _id);

            int count;

            lock (_queue)
            {
                count = _queue.Count;
                _queue.Enqueue(valueSet);
            }

            if (0 == count)
            {
                _sendTask.Fire();
            }
        }