/// <summary>
 /// creates a class that is registered to notification of INotifyCollectionChanged
 /// </summary>
 /// <param name="collectionBehaviour">The behavoir (return value) for the listnener</param>
 /// <returns>Return a listener instance that is registered to notifications</returns>
 public static IValueConverter RegisterCollectionNotification(CollectionBehaviour collectionBehaviour)
 {
     switch (collectionBehaviour)
     {
         case CollectionBehaviour.LastValue:
             return new CollectionNotifier(new CollectionLastValueNotificationStrategy());
         case CollectionBehaviour.Count:
             return new CollectionNotifier(new CollectionCountNotificationStrategy());
         default:
             break;
     }
     return null;
 }
예제 #2
0
        /// <summary>
        /// creates a class that is registered to notification of INotifyCollectionChanged
        /// </summary>
        /// <param name="collectionBehaviour">The behavoir (return value) for the listnener</param>
        /// <returns>Return a listener instance that is registered to notifications</returns>
        public static IValueConverter RegisterCollectionNotification(CollectionBehaviour collectionBehaviour)
        {
            switch (collectionBehaviour)
            {
            case CollectionBehaviour.LastValue:
                return(new CollectionNotifier(new CollectionLastValueNotificationStrategy()));

            case CollectionBehaviour.Count:
                return(new CollectionNotifier(new CollectionCountNotificationStrategy()));

            default:
                break;
            }
            return(null);
        }