BrightIdeasSoftware.OneOfFilter.Filter C# (CSharp) Метод

Filter() публичный Метод

Should the given model object be included?
public Filter ( object modelObject ) : bool
modelObject object
Результат bool
        public virtual bool Filter(object modelObject)
        {
            if (this.ValueGetter == null || this.PossibleValues == null || this.PossibleValues.Count == 0)
                return false;

            object result = this.ValueGetter(modelObject);
            IEnumerable enumerable = result as IEnumerable;
            if (result is string || enumerable == null)
                return this.DoesValueMatch(result);

            foreach (object x in enumerable) {
                if (this.DoesValueMatch(x))
                    return true;
            }
            return false;
        }