public void Can_Filter_For_Specific_Types_With_Multiple_Include_Filters() { scanner.WithIncludeFilter(type => type.FullName.Contains(typeof(TheImportedConfigurationClass).Name)); scanner.WithIncludeFilter(type => type.FullName.Contains(typeof(TheConfigurationClass).Name)); context.Scan(scanner); context.Refresh(); AssertExpectedObjectsAreRegisteredWith(context, 19); }
private void ParseTypeFilters(AssemblyObjectDefinitionScanner scanner, XmlElement element) { foreach (XmlNode node in element.ChildNodes) { if (node.Name.Contains(INCLUDE_FILTER_ELEMENT)) { scanner.WithIncludeFilter(CreateTypeFilter(node)); } else if (node.Name.Contains(EXCLUDE_FILTER_ELEMENT)) { scanner.WithExcludeFilter(CreateTypeFilter(node)); } } }
private void ParseTypeFilters(AssemblyObjectDefinitionScanner scanner, XmlElement element) { foreach (XmlNode node in element.ChildNodes) { if (node.Name.Contains(INCLUDE_FILTER_ELEMENT)) { var filter = CreateTypeFilter(node); Logger.Debug(m => m("Inlude Filter: {0}", filter)); scanner.WithIncludeFilter(filter); } else if (node.Name.Contains(EXCLUDE_FILTER_ELEMENT)) { var filter = CreateTypeFilter(node); Logger.Debug(m => m("Exclude Filter: {0}", filter)); scanner.WithExcludeFilter(filter); } } }