ContractBasedImportDefinition Class

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)

System.Object
  System.ComponentModel.Composition.Primitives.ImportDefinition
    System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition

public class ContractBasedImportDefinition : ImportDefinition

NameDescription
System_CAPS_protmethodContractBasedImportDefinition()

Initializes a new instance of the ContractBasedImportDefinition class.

System_CAPS_pubmethodContractBasedImportDefinition(String, String, IEnumerable<KeyValuePair<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, and creation policy, and indicates whether the import definition is recomposable or a prerequisite.

System_CAPS_pubmethodContractBasedImportDefinition(String, String, IEnumerable<KeyValuePair<String, Type>>, ImportCardinality, Boolean, Boolean, CreationPolicy, IDictionary<String, Object>)

Initializes a new instance of the ContractBasedImportDefinition class with the specified contract name, required type identity, required and optional metadata, cardinality, and creation policy, and indicates whether the import definition is recomposable or a prerequisite.

NameDescription
System_CAPS_pubpropertyCardinality

Gets the cardinality of the exports required by the import definition.(Inherited from ImportDefinition.)

System_CAPS_pubpropertyConstraint

Gets an expression that defines conditions that must be matched to satisfy the import described by this import definition.(Overrides ImportDefinition.Constraint.)

System_CAPS_pubpropertyContractName

Gets the name of the contract.(Inherited from ImportDefinition.)

System_CAPS_pubpropertyIsPrerequisite

Gets a value that indicates whether the import definition must be satisfied before a part can start producing exported objects.(Inherited from ImportDefinition.)

System_CAPS_pubpropertyIsRecomposable

Gets a value that indicates whether the import definition can be satisfied multiple times.(Inherited from ImportDefinition.)

System_CAPS_pubpropertyMetadata

Gets the metadata associated with this import.(Inherited from ImportDefinition.)

System_CAPS_pubpropertyRequiredCreationPolicy

Gets or sets a value that indicates that the importer requires a specific CreationPolicy for the exports used to satisfy this import.

System_CAPS_pubpropertyRequiredMetadata

Gets the metadata names of the export required by the import definition.

System_CAPS_pubpropertyRequiredTypeIdentity

Gets the expected type of the export that matches this ContractBasedImportDefinition.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIsConstraintSatisfiedBy(ExportDefinition)

Returns 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).)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the string representation of this ContractBasedImportDefinition object.(Overrides ImportDefinition.ToString().)

.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0

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

Return to top
Show:
© 2016 Microsoft