New to Telerik UI for WinForms? Start a free 30-day trial

Builds a MEF catalog from the application directory for a root assembly and assemblies that directly reference it.

Assembly discovery uses reflection-only loading, which is unsupported on .NET Core and can throw PlatformNotSupportedException.

Definition

Namespace:Telerik.WinForms.Documents.UI.Extensibility

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class DependencyCatalog : ComposablePartCatalog, IEnumerable, IDisposable

Inheritance: objectComposablePartCatalogDependencyCatalog

Implements: IDisposableIEnumerable

Inherited Members ComposablePartCatalog.GetExports(ImportDefinition)ComposablePartCatalog.Dispose()ComposablePartCatalog.Dispose(bool)ComposablePartCatalog.GetEnumerator()

Constructors

Scans the application directory and includes the root assembly and its direct dependents when their file paths pass the supplied filter.

C#
public DependencyCatalog(string assemblyName, Func<string, bool> fileFilter)
Parameters:assemblyNamestring

The simple name of the root assembly to include.

fileFilterFunc<string, bool>

A predicate for candidate file paths; when null, all files in the directory are examined.

Scans the application directory using DefaultFileNameFilter(string) and includes the root assembly and its direct dependents.

C#
public DependencyCatalog(string assemblyName)
Parameters:assemblyNamestring

The simple name of the root assembly to include.

Properties

Gets or sets the predicate applied to file paths during the constructor's directory scan. Changing this property after construction does not rebuild the catalog.

C#
public Func<string, bool> FileFilter { get; set; }

Gets the part definitions from the assemblies included in the aggregate catalog.

C#
public override IQueryable<ComposablePartDefinition> Parts { get; }

Overrides: ComposablePartCatalog.Parts

Gets the simple name used to select the root assembly and its direct dependents, subject to the file filter.

C#
public string RootDependencyAssemblyName { get; }

Methods

Determines whether a file path ends with the lowercase .dll or .exe suffix.

C#
public static bool DefaultFileNameFilter(string fileName)
Parameters:fileNamestring

The file path to test.

Returns:

bool

true if the path has one of those suffixes; otherwise, false.