/// <summary> /// Add a new subscriber. /// </summary> /// <param name="subscriber">The subscriber to be notified.</param> public void Add(ICollectionItemsOperationSubscriber subscriber) { if (!_subscribers.Contains(subscriber)) { _subscribers.Add(subscriber); } }
/// <summary> /// Add the new subscriber on operation with items in the collection. /// </summary> /// <typeparam name="T">The type of which subscriber is subscribed.</typeparam> /// <param name="subscriber">The subscriber to be notified.</param> public void Add <T>(ICollectionItemsOperationSubscriber subscriber) { var operationController = GetOperationControllerBy(typeof(T)); if (operationController == _nullSubscriberSetController) { operationController = new SubscriberSetController <T>(); Register(operationController); } operationController.Add(subscriber); }
/// <summary> /// Add a new subscriber. /// </summary> /// <param name="subscriber">The subscriber to be notified.</param> public void Add(ICollectionItemsOperationSubscriber subscriber) { }
/// <summary> /// Subscribe on the action when items of specified type are selected. /// </summary> /// <param name="subscriber">The subcriber to be notified about the operation.</param> /// <typeparam name="T">The type of selected items.</typeparam> public void SubscribeOnSelectedItems <T>(ICollectionItemsOperationSubscriber subscriber) { _collectionNotificationControllerManager.Add <T>(subscriber); }