/// <summary> /// Adiciona mais um novo observer para o agregador. /// </summary> /// <param name="observer"></param> /// <param name="liveScope"></param> /// <returns></returns> public AggregateNotifyCollectionChangedObserver Add(INotifyCollectionChangedObserver observer, NotifyCollectionChangedObserverLiveScope liveScope) { if (observer != null) { lock (_observers) _observers.Enqueue(new Tuple <NotifyCollectionChangedObserverLiveScope, INotifyCollectionChangedObserver>(liveScope, observer)); } return(this); }
/// <summary> /// Adiciona um observer para a instancia. /// </summary> /// <param name="observer"></param> /// <param name="liveScope"></param> void INotifyCollectionChangedObserverContainer.AddObserver(INotifyCollectionChangedObserver observer, NotifyCollectionChangedObserverLiveScope liveScope) { observer.Require("observer").NotNull(); _observer.Add(observer, liveScope); }