Ejemplo n.º 1
0
        public bool Remove(IMediaSegment segment)
        {
            bool result;

            lock (((IDictionary)_segments).SyncRoot)
                result = _segments.Remove(((MediaSegment)segment).DtoGuid);
            if (result)
            {
                SegmentRemoved?.Invoke(this, new MediaSegmentEventArgs(segment));
                NotifyPropertyChanged(nameof(Count));
            }
            return(result);
        }
Ejemplo n.º 2
0
        public bool Remove(IMediaSegment segment)
        {
            bool          result = false;
            IMediaSegment removed;

            if (_segments.TryRemove(((MediaSegment)segment).DtoGuid, out removed))
            {
                result = true;
                SegmentRemoved?.Invoke(this, new MediaSegmentEventArgs(removed));
                NotifyPropertyChanged(nameof(Count));
            }
            return(result);
        }