コード例 #1
0
        public bool IsFilteredOut(List <Slice> slices)
        {
            List <string> propertyNames = this.PropertyValues.Select(p => p.Item.PropertyName).ToList();

            if (!slices.Any())
            {
                return(false);
            }

            foreach (var slice in slices)
            {
                if (String.IsNullOrEmpty(slice.PropertyValue.StringValue) || slice.PropertyValue.StringValue == Constants.None)
                {
                    continue;
                }

                if (!propertyNames.Contains(slice.PropertyValue.PropertyName))
                {
                    return(true);
                }

                if (PropertyValues.Any(p => p.Item.IsFilteredOut(slice)))
                {
                    return(true);
                }
            }

            return(false);
        }