GetFiltersFor() public method

public GetFiltersFor ( Type commandType ) : IEnumerable
commandType System.Type
return IEnumerable
        private FilterCollection CreateFilterCollection(Type commandType)
        {
            var filterTypes = _filterSelector.GetFiltersFor(commandType);
            var filters     = filterTypes.Select(x => _objectFactory.GetHandlerInstance(x));

            return(new FilterCollection(filters));
        }
Ejemplo n.º 2
0
        public void It_can_find_handler_by_subtype()
        {
            var collection = new FilterSelector(typeof(TestCommandFilter));

            var filterTypes = collection.GetFiltersFor(typeof(DerivedTestCommand));

            Assert.Contains(typeof(TestCommandFilter), filterTypes.ToList());
        }