PartBuilder.ExportInterfaces Method

Definition

Specifies a set of interfaces that should be exported on the matching types.

Overloads

ExportInterfaces()

Specifies that all the interfaces of the matching types should be exported.

ExportInterfaces(Predicate<Type>)

Specifies a set of interfaces on the matching types that should be exported.

ExportInterfaces(Predicate<Type>, Action<Type,ExportBuilder>)

Specifies a set of interfaces on the matching types that should be exported, and provides configuration information for the resulting exports.

ExportInterfaces()

Source:
PartBuilder.cs
Source:
PartBuilder.cs
Source:
PartBuilder.cs

Specifies that all the interfaces of the matching types should be exported.

C#
public System.ComponentModel.Composition.Registration.PartBuilder ExportInterfaces();

Returns

The current object, to allow chaining.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.1 (package-provided)

ExportInterfaces(Predicate<Type>)

Source:
PartBuilder.cs
Source:
PartBuilder.cs
Source:
PartBuilder.cs

Specifies a set of interfaces on the matching types that should be exported.

C#
public System.ComponentModel.Composition.Registration.PartBuilder ExportInterfaces(Predicate<Type> interfaceFilter);

Parameters

interfaceFilter
Predicate<Type>

A predicate that specifies a set of interfaces.

Returns

The current object, to allow chaining.

Exceptions

interfaceFilter is null.

Remarks

This method will not export IDisposable or IPartImportsSatisfiedNotification objects.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.1 (package-provided)

ExportInterfaces(Predicate<Type>, Action<Type,ExportBuilder>)

Source:
PartBuilder.cs
Source:
PartBuilder.cs
Source:
PartBuilder.cs

Specifies a set of interfaces on the matching types that should be exported, and provides configuration information for the resulting exports.

C#
public System.ComponentModel.Composition.Registration.PartBuilder ExportInterfaces(Predicate<Type> interfaceFilter, Action<Type,System.ComponentModel.Composition.Registration.ExportBuilder> exportConfiguration);

Parameters

interfaceFilter
Predicate<Type>

A predicate that specifies a set of interfaces.

exportConfiguration
Action<Type,ExportBuilder>

An object that contains configuration information about the export. The default value is null.

Returns

The current object, to allow chaining.

Exceptions

interfaceFilter is null.

Remarks

This method will not export IDisposable or IPartImportsSatisfiedNotification objects.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.1 (package-provided)