Exemplo n.º 1
0
 /// <summary>
 /// Checks if an object passes the test or not.
 /// </summary>
 /// <param name="Object">Untyped object</param>
 /// <returns>If the object passes the test.</returns>
 public bool Passes(object Object)
 {
     if (this.ChildFilter is ICustomFilter CustomFilter)
     {
         return(!CustomFilter.Passes(Object));
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Checks if an object passes the test or not.
        /// </summary>
        /// <param name="Object">Untyped object</param>
        /// <returns>If the object passes the test.</returns>
        public bool Passes(object Object)
        {
            foreach (Filter F in this.ChildFilters)
            {
                if (F is ICustomFilter CustomFilter && CustomFilter.Passes(Object))
                {
                    return(true);
                }
            }

            return(false);
        }