IdeaBlade DevForce 2010 Help Reference
SearchPatterns Property
See Also  Example Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core.Composition Namespace > CompositionHost Class : SearchPatterns Property



Search patterns to use when looking for assemblies for the PartsCatalog.

Syntax

Visual Basic (Declaration) 
Public Shared Property SearchPatterns As List(Of String)
Visual Basic (Usage)Copy Code
Dim value As List(Of String)
 
CompositionHost.SearchPatterns = value
 
value = CompositionHost.SearchPatterns
C# 
public static List<string> SearchPatterns {get; set;}
C++/CLI 
public:
static property List<String^>^ SearchPatterns {
   List<String^>^ get();
   void set (    List<String^>^ value);
}

Example

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

Remarks

For ASP.NET and Silverlight applications the default is "*.dll"; for other applications the default is "*.dll" and "*.exe".

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.

SearchPatterns are applied before IgnorePatterns.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.