public void Union()
        {
            Assert.IsTrue(exceptionFilter.Matches(typeof(SystemException)));
            Assert.IsFalse(exceptionFilter.Matches(typeof(TestObject)));
            Assert.IsFalse(itoFilter.Matches(typeof(Exception)));
            Assert.IsTrue(itoFilter.Matches(typeof(TestObject)));
            ITypeFilter union = TypeFilters.Union(exceptionFilter, itoFilter);

            Assert.IsTrue(union.Matches(typeof(SystemException)));
            Assert.IsTrue(union.Matches(typeof(TestObject)));
        }
Beispiel #2
0
 /// <summary>
 /// Changes the current type filter to be the union of the existing filter and the
 /// supplied <paramref name="filter"/>.
 /// </summary>
 /// <param name="filter">The filter to union with.</param>
 /// <returns>
 /// The union of the existing filter and the supplied <paramref name="filter"/>.
 /// </returns>
 public virtual ComposablePointcut Union(ITypeFilter filter)
 {
     _typeFilter = TypeFilters.Union(_typeFilter, filter);
     return(this);
 }