ReflectionModelServices Class

Definition

Provides extension methods to create and retrieve reflection-based parts.

C#
public static class ReflectionModelServices
C#
[System.Security.SecurityCritical]
public static class ReflectionModelServices
Inheritance
ReflectionModelServices
Attributes

Methods

CreateExportDefinition(LazyMemberInfo, String, Lazy<IDictionary<String,Object>>, ICompositionElement)

Creates an export definition from the specified member, with the specified contract name, metadata, and origin.

CreateImportDefinition(Lazy<ParameterInfo>, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, CreationPolicy, ICompositionElement)

Creates an import definition for the specified parameter by using the specified contract name, type identity, import metadata, cardinality, and creation policy.

CreateImportDefinition(Lazy<ParameterInfo>, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Creates an import definition for the specified parameter by using the specified contract name, type identity, import and contract metadata, cardinality, and creation policy.

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, Boolean, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Creates an import definition for the specified member by using the specified contract name, type identity, import and contract metadata, cardinality, recomposition policy, and creation policy.

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, CreationPolicy, ICompositionElement)

Creates an import definition for the specified member by using the specified contract name, type identity, import metadata, cardinality, recomposition policy, and creation policy.

CreateImportDefinition(LazyMemberInfo, String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, CreationPolicy, IDictionary<String, Object>, Boolean, ICompositionElement)

Creates an import definition for the specified member by using the specified contract name, type identity, import and contract metadata, cardinality, recomposition policy, and creation policy.

CreatePartDefinition(Lazy<Type>, Boolean, Lazy<IEnumerable<ImportDefinition>>, Lazy<IEnumerable<ExportDefinition>>, Lazy<IDictionary<String, Object>>, ICompositionElement)

Creates a part definition with the specified part type, imports, exports, metadata, and origin.

GetExportFactoryProductImportDefinition(ImportDefinition)

Returns a representation of an import definition as an export factory product.

GetExportingMember(ExportDefinition)

Gets the exporting member from a specified export definition.

GetImportingMember(ImportDefinition)

Gets the importing member from a specified import definition.

GetImportingParameter(ImportDefinition)

Gets the importing parameter from a specified import definition.

GetPartType(ComposablePartDefinition)

Gets the type of a part from a specified part definition.

IsDisposalRequired(ComposablePartDefinition)

Determines whether the specified part requires disposal.

IsExportFactoryImportDefinition(ImportDefinition)

Indicates whether a specified import definition represents an export factory (ExportFactory<T> or ExportFactory<T,TMetadata> object).

IsImportingParameter(ImportDefinition)

Determines whether an import definition represents a member or a parameter.

TryMakeGenericPartDefinition(ComposablePartDefinition, IEnumerable<Type>, ComposablePartDefinition)

Indicates whether a generic part definition can be specialized with the provided parameters.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 4.0, 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.0 (package-provided)