Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PartConventionBuilder<T> Class

.NET Framework 4.6 and 4.5

Configures a type as a part, with strongly typed return values.


Namespace:  System.Composition.Convention
Assembly:  System.Composition.Convention (in System.Composition.Convention.dll)

public class PartConventionBuilder<T> : PartConventionBuilder

Type Parameters


The type of the part.

The PartConventionBuilder<T> type exposes the following members.

Public methodAddPartMetadata(String, Func<Type, Object>) (Inherited from PartConventionBuilder.)
Public methodAddPartMetadata(String, Object)Adds metadata that has the specified name and value to the part. (Inherited from PartConventionBuilder.)
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExport()Exports the part with its concrete type as the contract type. (Inherited from PartConventionBuilder.)
Public methodExport(Action<ExportConventionBuilder>)Exports the part that has the specified configuration. (Inherited from PartConventionBuilder.)
Public methodExportInterfaces()Selects all interfaces on the part type to be exported. (Inherited from PartConventionBuilder.)
Public methodExportInterfaces(Predicate<Type>)Selects interfaces on the part type to be exported according to the specified filter. (Inherited from PartConventionBuilder.)
Public methodExportInterfaces(Predicate<Type>, Action<Type, ExportConventionBuilder>) (Inherited from PartConventionBuilder.)
Public methodExportProperties(Predicate<PropertyInfo>)Selects the properties on the part to export according the specified predicate. (Inherited from PartConventionBuilder.)
Public methodExportProperties(Predicate<PropertyInfo>, Action<PropertyInfo, ExportConventionBuilder>) (Inherited from PartConventionBuilder.)
Public methodExportProperty(Expression<Func<T, Object>>)
Public methodExportProperty(Expression<Func<T, Object>>, Action<ExportConventionBuilder>)
Public methodExportProperty<TContract>(Expression<Func<T, Object>>)
Public methodExportProperty<TContract>(Expression<Func<T, Object>>, Action<ExportConventionBuilder>)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodImportProperties(Predicate<PropertyInfo>)Selects the properties on the part to import according to the specified predicate. (Inherited from PartConventionBuilder.)
Public methodImportProperties(Predicate<PropertyInfo>, Action<PropertyInfo, ImportConventionBuilder>) (Inherited from PartConventionBuilder.)
Public methodImportProperty(Expression<Func<T, Object>>)
Public methodImportProperty(Expression<Func<T, Object>>, Action<ImportConventionBuilder>)
Public methodImportProperty<TContract>(Expression<Func<T, Object>>)
Public methodImportProperty<TContract>(Expression<Func<T, Object>>, Action<ImportConventionBuilder>)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodNotifyImportsSatisfied(Predicate<MethodInfo>)Select methods to be used as a notification when composition is complete. (Inherited from PartConventionBuilder.)
Public methodNotifyImportsSatisfied(Expression<Action<T>>)Selects a method to be called when composition is complete.
Public methodSelectConstructor(Func<IEnumerable<ConstructorInfo>, ConstructorInfo>) (Inherited from PartConventionBuilder.)
Public methodSelectConstructor(Expression<Func<ParameterImportConventionBuilder, T>>)
Public methodSelectConstructor(Func<IEnumerable<ConstructorInfo>, ConstructorInfo>, Action<ParameterInfo, ImportConventionBuilder>) (Inherited from PartConventionBuilder.)
Public methodShared()Marks the part as being shared throughout the entire composition. (Inherited from PartConventionBuilder.)
Public methodShared(String)Marks the part as being shared within the specified boundary. (Inherited from PartConventionBuilder.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft