ContractBasedImportDefinition Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an import that is required by a ComposablePart object and that can specify both a contract name and metadata.
public ref class ContractBasedImportDefinition : System::ComponentModel::Composition::Primitives::ImportDefinition
public class ContractBasedImportDefinition : System.ComponentModel.Composition.Primitives.ImportDefinition
type ContractBasedImportDefinition = class
inherit ImportDefinition
Public Class ContractBasedImportDefinition
Inherits ImportDefinition
- Inheritance
Constructors
ContractBasedImportDefinition() |
Initializes a new instance of the ContractBasedImportDefinition class. |
ContractBasedImportDefinition(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. |
ContractBasedImportDefinition(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. |
Properties
Cardinality |
Gets the cardinality of the exports required by the import definition. (Inherited from ImportDefinition) |
Constraint |
Gets an expression that defines conditions that must be matched to satisfy the import described by this import definition. |
ContractName |
Gets the name of the contract. (Inherited from ImportDefinition) |
IsPrerequisite |
Gets a value that indicates whether the import definition must be satisfied before a part can start producing exported objects. (Inherited from ImportDefinition) |
IsRecomposable |
Gets a value that indicates whether the import definition can be satisfied multiple times. (Inherited from ImportDefinition) |
Metadata |
Gets the metadata associated with this import. (Inherited from ImportDefinition) |
RequiredCreationPolicy |
Gets or sets a value that indicates that the importer requires a specific CreationPolicy for the exports used to satisfy this import. |
RequiredMetadata |
Gets the metadata names of the export required by the import definition. |
RequiredTypeIdentity |
Gets the expected type of the export that matches this ContractBasedImportDefinition. |
Methods
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
IsConstraintSatisfiedBy(ExportDefinition) |
Returns a value indicating whether the constraint represented by this object is satisfied by the export represented by the given export definition. |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns the string representation of this ContractBasedImportDefinition object. |
ToString() |
Returns a string representation of the import definition. (Inherited from ImportDefinition) |
Applies to
.NET