Example #1
0
        /// <summary>
        /// Filters a <see cref="ReadOnlyNotificationCollection"/> for a given <see cref="NotificationType"/>s.
        /// </summary>
        /// <param name="notifications">The <see cref="ReadOnlyNotificationCollection"/></param>
        /// <param name="filters">The new <see cref="NotificationType"/>s by which to filter.</param>
        /// <returns>The filtered collection.</returns>
        /// <remarks>The new filter parameters will function as OR parameters.</remarks>
        public static ReadOnlyNotificationCollection Filter(this ReadOnlyNotificationCollection notifications, IEnumerable <NotificationType> filters)
        {
            var collection = new ReadOnlyNotificationCollection(notifications, notifications.Auth);

            collection.AddFilter(filters);
            return(collection);
        }
Example #2
0
        /// <summary>
        /// Filters a <see cref="ReadOnlyNotificationCollection"/> for a given <see cref="NotificationType"/>.
        /// </summary>
        /// <param name="notifications">The <see cref="ReadOnlyNotificationCollection"/></param>
        /// <param name="filter">The new <see cref="NotificationType"/> by which to filter.  Can be combined using the bitwise OR operator.</param>
        /// <returns>The filtered collection.</returns>
        /// <remarks>The new filter parameter will function as an OR parameter.</remarks>
        public static ReadOnlyNotificationCollection Filter(this ReadOnlyNotificationCollection notifications, NotificationType filter)
        {
            var collection = new ReadOnlyNotificationCollection(notifications, notifications.Auth);

            collection.AddFilter(new[] { filter });
            return(collection);
        }