private static bool MatchPrimaryFilter(IDictionary <string, ICollection <object> > tags , NameValuePair filter) { ICollection <object> value = tags[filter.GetName()]; if (value == null) { // doesn't have the filter return(false); } else { return(value.Contains(filter.GetValue())); } }
private static bool MatchFilter(IDictionary <string, object> tags, NameValuePair filter ) { object value = tags[filter.GetName()]; if (value == null) { // doesn't have the filter return(false); } else { if (!value.Equals(filter.GetValue())) { // doesn't match the filter return(false); } } return(true); }