DevForce Help Reference
IgnorePatterns Property
Example 


Patterns used to ignore assemblies when building the PartsCatalog.
Syntax
'Declaration
 
Public Shared Property IgnorePatterns As List(Of String)
'Usage
 
Dim value As List(Of String)
 
CompositionHost.IgnorePatterns = value
 
value = CompositionHost.IgnorePatterns
public static List<string> IgnorePatterns {get; set;}
Remarks
IdeaBlade, System and Microsoft assemblies are automatically ignored, as well as assemblies from many 3rd party component suites.

You may add and remove patterns from the list to suit your needs. You may supply a Regex pattern or a simple wildcard pattern. If you supply a simple pattern it will be converted to a Regex pattern. The conversion escapes the "." (dot) character, and changes "*" (wildcard) to ".*".

Use the SearchPatterns and IgnorePatterns to improve the startup time of your application. The only assemblies which must be probed for discovery purposes are those containing your entity models, extensible components and known types. If many unnecessary assemblies are probed the startup time of your application will suffer. However, if assemblies which should be probed are not, your application will not work correctly. Always check the debug log to see which assemblies have been probed.

You should avoid clearing the IgnorePatterns altogether, and instead add patterns as needed. If the "IdeaBlade.*" assemblies are probed your program will not work correctly, and if "System.*" and other system-related assemblies are probed performance will suffer. The default IgnorePatterns exclude these assemblies.

SearchPatterns are applied before IgnorePatterns.

Example
<code lang="C#">
  // At application startup
  CompositionHost.SearchPatterns.Clear();
  CompositionHost.SearchPatterns.Add("DomainModel.dll");  //  Add whatever assemblies you need probed
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CompositionHost Class
CompositionHost Members

Send Feedback