Export (0) Print
Expand All

ContractBasedImportDefinition Class

Represents an import that is required by a ComposablePart object and that can specify both a contract name and metadata.


Namespace:  System.ComponentModel.Composition.Primitives
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

Public Class ContractBasedImportDefinition _
	Inherits ImportDefinition

The ContractBasedImportDefinition type exposes the following members.

Protected methodContractBasedImportDefinitionInitializes a new instance of the ContractBasedImportDefinition class.
Public methodContractBasedImportDefinition(String, String, IEnumerable(Of KeyValuePair(Of String, Type)), ImportCardinality, Boolean, Boolean, CreationPolicy)Initializes a new instance of the ContractBasedImportDefinition class with the specified contract name, required type identity, required metadata, cardinality, a value that indicates if the import definition is recomposable, a value that indicates if the import definition is a prerequisite, and a value that indicates the required creation policy.

Public propertyCardinalityGets the cardinality of the exports required by the import definition. (Inherited from ImportDefinition.)
Public propertyConstraintGets an expression that defines conditions that must be matched to satisfy the import described by this import definition. (Overrides ImportDefinition.Constraint.)
Public propertyContractNameGets the name of the contract. (Inherited from ImportDefinition.)
Public propertyIsPrerequisiteGets a value that indicates whether the import definition must be satisfied before a part can start producing exported objects. (Inherited from ImportDefinition.)
Public propertyIsRecomposableGets a value that indicates whether the import definition can be satisfied multiple times. (Inherited from ImportDefinition.)
Public propertyRequiredCreationPolicyGets or sets a value that indicates that the importer requires a specific CreationPolicy for the exports used to satisfy this import.
Public propertyRequiredMetadataGets the metadata names of the export required by the import definition.
Public propertyRequiredTypeIdentityGets the expected type of the export that matches this ContractBasedImportDefinition.

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object 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 methodIsConstraintSatisfiedByReturns a value indicating whether the constraint represented by this object is satisfied by the export represented by the given export definition. (Overrides ImportDefinition.IsConstraintSatisfiedBy(ExportDefinition).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string representation of the import definition. (Inherited from ImportDefinition.)


Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

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

Community Additions

© 2015 Microsoft