예제 #1
0
        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()));
            }
        }
예제 #2
0
        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);
        }