internal static Boolean FilterSubscription(PersistentSubscriptionInfo subscription, String filter) { List <string> filterList = new List <String>(); if (!String.IsNullOrEmpty(filter)) { if (filter.Contains(",") == false) { filterList.Add(filter); } else { filterList = filter.Split(",").ToList(); } foreach (String filterItem in filterList) { // Handle the fact that spaces could bne in the filter var trimmedFilterItem = filterItem.Trim(); if (subscription.GroupName.Contains(trimmedFilterItem, StringComparison.CurrentCultureIgnoreCase)) { return(true); } } return(false); } return(true); }
internal static Boolean ContainsStream(PersistentSubscriptionInfo subscription, String stream) { if (String.IsNullOrEmpty(stream)) { return(true); } return(subscription.StreamName.Contains(stream, StringComparison.CurrentCultureIgnoreCase)); }
internal static Boolean IgnoreSubscription(PersistentSubscriptionInfo subscription, String ignore) { if (!String.IsNullOrEmpty(ignore)) { if (subscription.GroupName.Contains(ignore, StringComparison.CurrentCultureIgnoreCase)) { return(false); } } return(true); }