1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="ContractBasedImportDefinition" FullName="System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition">
3 <TypeSignature Language="C#" Value="public class ContractBasedImportDefinition : System.ComponentModel.Composition.Primitives.ImportDefinition" />
4 <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ContractBasedImportDefinition extends System.ComponentModel.Composition.Primitives.ImportDefinition" />
6 <AssemblyName>System.ComponentModel.Composition</AssemblyName>
7 <AssemblyVersion>4.0.0.0</AssemblyVersion>
10 <BaseTypeName>System.ComponentModel.Composition.Primitives.ImportDefinition</BaseTypeName>
14 <remarks>To be added.</remarks>
16 <attribution license="cc4" from="Microsoft" modified="false" />
17 <para>Represents an import that is required by a <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" /> object and that can specify both a contract name and metadata.</para>
21 <Member MemberName=".ctor">
22 <MemberSignature Language="C#" Value="protected ContractBasedImportDefinition ();" />
23 <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
24 <MemberType>Constructor</MemberType>
26 <AssemblyVersion>4.0.0.0</AssemblyVersion>
30 <remarks>To be added.</remarks>
32 <attribution license="cc4" from="Microsoft" modified="false" />
33 <para>Initializes a new instance of the <see cref="T:System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition" /> class.</para>
37 <Member MemberName=".ctor">
38 <MemberSignature Language="C#" Value="public ContractBasedImportDefinition (string contractName, string requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy);" />
39 <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string contractName, string requiredTypeIdentity, class System.Collections.Generic.IEnumerable`1<valuetype System.Collections.Generic.KeyValuePair`2<string, class System.Type>> requiredMetadata, valuetype System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, valuetype System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy) cil managed" />
40 <MemberType>Constructor</MemberType>
42 <AssemblyVersion>4.0.0.0</AssemblyVersion>
45 <Parameter Name="contractName" Type="System.String" />
46 <Parameter Name="requiredTypeIdentity" Type="System.String" />
47 <Parameter Name="requiredMetadata" Type="System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.Type>>" />
48 <Parameter Name="cardinality" Type="System.ComponentModel.Composition.Primitives.ImportCardinality" />
49 <Parameter Name="isRecomposable" Type="System.Boolean" />
50 <Parameter Name="isPrerequisite" Type="System.Boolean" />
51 <Parameter Name="requiredCreationPolicy" Type="System.ComponentModel.Composition.CreationPolicy" />
54 <remarks>To be added.</remarks>
56 <attribution license="cc4" from="Microsoft" modified="false" />
57 <para>Initializes a new instance of the <see cref="T:System.ComponentModel.Composition.Primitives.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.</para>
59 <param name="contractName">
60 <attribution license="cc4" from="Microsoft" modified="false" />The contract name of the <see cref="T:System.ComponentModel.Composition.Primitives.Export" /> object required by the import definition.</param>
61 <param name="requiredTypeIdentity">
62 <attribution license="cc4" from="Microsoft" modified="false" />The type identity of the export type expected. Use the <see cref="M:System.ComponentModel.Composition.AttributedModelServices.GetTypeIdentity(System.Type)" /> method to generate a type identity for a given type. If no specific type is required, use null.</param>
63 <param name="requiredMetadata">
64 <attribution license="cc4" from="Microsoft" modified="false" />A collection of key/value pairs that contain the metadata names and types required by the import definition; or null to set the <see cref="P:System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition.RequiredMetadata" /> property to an empty <see cref="T:System.Collections.Generic.IEnumerable`1" /> collection.</param>
65 <param name="cardinality">
66 <attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that indicates the cardinality of the <see cref="T:System.ComponentModel.Composition.Primitives.Export" /> objects required by the import definition.</param>
67 <param name="isRecomposable">
68 <attribution license="cc4" from="Microsoft" modified="false" />true to specify that the import definition can be satisfied multiple times throughout the lifetime of a <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" />; otherwise, false.</param>
69 <param name="isPrerequisite">
70 <attribution license="cc4" from="Microsoft" modified="false" />true to specify that the import definition is required to be satisfied before a <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" /> can start producing exported objects; otherwise, false.</param>
71 <param name="requiredCreationPolicy">
72 <attribution license="cc4" from="Microsoft" modified="false" />A value that indicates that the importer requires a specific creation policy for the exports used to satisfy this import. If no specific creation policy is needed, the default is <see cref="F:System.ComponentModel.Composition.CreationPolicy.Any" />.</param>
75 <Member MemberName=".ctor">
76 <MemberSignature Language="C#" Value="public ContractBasedImportDefinition (string contractName, string requiredTypeIdentity, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> requiredMetadata, System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, System.Collections.Generic.IDictionary<string,object> metadata);" />
77 <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string contractName, string requiredTypeIdentity, class System.Collections.Generic.IEnumerable`1<valuetype System.Collections.Generic.KeyValuePair`2<string, class System.Type>> requiredMetadata, valuetype System.ComponentModel.Composition.Primitives.ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, valuetype System.ComponentModel.Composition.CreationPolicy requiredCreationPolicy, class System.Collections.Generic.IDictionary`2<string, object> metadata) cil managed" />
78 <MemberType>Constructor</MemberType>
80 <AssemblyVersion>4.0.0.0</AssemblyVersion>
83 <Parameter Name="contractName" Type="System.String" />
84 <Parameter Name="requiredTypeIdentity" Type="System.String" />
85 <Parameter Name="requiredMetadata" Type="System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.Type>>" />
86 <Parameter Name="cardinality" Type="System.ComponentModel.Composition.Primitives.ImportCardinality" />
87 <Parameter Name="isRecomposable" Type="System.Boolean" />
88 <Parameter Name="isPrerequisite" Type="System.Boolean" />
89 <Parameter Name="requiredCreationPolicy" Type="System.ComponentModel.Composition.CreationPolicy" />
90 <Parameter Name="metadata" Type="System.Collections.Generic.IDictionary<System.String,System.Object>" />
93 <remarks>To be added.</remarks>
95 <attribution license="cc4" from="Microsoft" modified="false" />
96 <para>Initializes a new instance of the <see cref="T:System.ComponentModel.Composition.Primitives.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.</para>
98 <param name="contractName">
99 <attribution license="cc4" from="Microsoft" modified="false" />The contract name of the <see cref="T:System.ComponentModel.Composition.Primitives.Export" /> object required by the import definition.</param>
100 <param name="requiredTypeIdentity">
101 <attribution license="cc4" from="Microsoft" modified="false" />The type identity of the export type expected. Use the <see cref="M:System.ComponentModel.Composition.AttributedModelServices.GetTypeIdentity(System.Type)" /> method to generate a type identity for a given type. If no specific type is required, use null.</param>
102 <param name="requiredMetadata">
103 <attribution license="cc4" from="Microsoft" modified="false" />A collection of key/value pairs that contain the metadata names and types required by the import definition; or null to set the <see cref="P:System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition.RequiredMetadata" /> property to an empty <see cref="T:System.Collections.Generic.IEnumerable`1" /> collection.</param>
104 <param name="cardinality">
105 <attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that indicates the cardinality of the <see cref="T:System.ComponentModel.Composition.Primitives.Export" /> objects required by the import definition.</param>
106 <param name="isRecomposable">
107 <attribution license="cc4" from="Microsoft" modified="false" />true to specify that the import definition can be satisfied multiple times throughout the lifetime of a <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" />; otherwise, false.</param>
108 <param name="isPrerequisite">
109 <attribution license="cc4" from="Microsoft" modified="false" />true to specify that the import definition is required to be satisfied before a <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" /> can start producing exported objects; otherwise, false.</param>
110 <param name="requiredCreationPolicy">
111 <attribution license="cc4" from="Microsoft" modified="false" />A value that indicates that the importer requires a specific creation policy for the exports used to satisfy this import. If no specific creation policy is needed, the default is <see cref="F:System.ComponentModel.Composition.CreationPolicy.Any" />.</param>
112 <param name="metadata">
113 <attribution license="cc4" from="Microsoft" modified="false" />The metadata associated with this import.</param>
116 <Member MemberName="Constraint">
117 <MemberSignature Language="C#" Value="public override System.Linq.Expressions.Expression<Func<System.ComponentModel.Composition.Primitives.ExportDefinition,bool>> Constraint { get; }" />
118 <MemberSignature Language="ILAsm" Value=".property instance class System.Linq.Expressions.Expression`1<class System.Func`2<class System.ComponentModel.Composition.Primitives.ExportDefinition, bool>> Constraint" />
119 <MemberType>Property</MemberType>
121 <AssemblyVersion>4.0.0.0</AssemblyVersion>
124 <ReturnType>System.Linq.Expressions.Expression<System.Func<System.ComponentModel.Composition.Primitives.ExportDefinition,System.Boolean>></ReturnType>
127 <value>To be added.</value>
128 <remarks>To be added.</remarks>
130 <attribution license="cc4" from="Microsoft" modified="false" />
131 <para>Gets an expression that defines conditions that must be matched to satisfy the import described by this import definition.</para>
135 <Member MemberName="IsConstraintSatisfiedBy">
136 <MemberSignature Language="C#" Value="public override bool IsConstraintSatisfiedBy (System.ComponentModel.Composition.Primitives.ExportDefinition exportDefinition);" />
137 <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsConstraintSatisfiedBy(class System.ComponentModel.Composition.Primitives.ExportDefinition exportDefinition) cil managed" />
138 <MemberType>Method</MemberType>
140 <AssemblyVersion>4.0.0.0</AssemblyVersion>
143 <ReturnType>System.Boolean</ReturnType>
146 <Parameter Name="exportDefinition" Type="System.ComponentModel.Composition.Primitives.ExportDefinition" />
149 <remarks>To be added.</remarks>
151 <attribution license="cc4" from="Microsoft" modified="false" />
152 <para>Returns a value indicating whether the constraint represented by this object is satisfied by the export represented by the given export definition.</para>
155 <attribution license="cc4" from="Microsoft" modified="false" />
156 <para>true if the constraint is satisfied; otherwise, false.</para>
158 <param name="exportDefinition">
159 <attribution license="cc4" from="Microsoft" modified="false" />The export definition to test.</param>
162 <Member MemberName="RequiredCreationPolicy">
163 <MemberSignature Language="C#" Value="public virtual System.ComponentModel.Composition.CreationPolicy RequiredCreationPolicy { get; }" />
164 <MemberSignature Language="ILAsm" Value=".property instance valuetype System.ComponentModel.Composition.CreationPolicy RequiredCreationPolicy" />
165 <MemberType>Property</MemberType>
167 <AssemblyVersion>4.0.0.0</AssemblyVersion>
170 <ReturnType>System.ComponentModel.Composition.CreationPolicy</ReturnType>
173 <value>To be added.</value>
174 <remarks>To be added.</remarks>
176 <attribution license="cc4" from="Microsoft" modified="false" />
177 <para>Gets or sets a value that indicates that the importer requires a specific <see cref="T:System.ComponentModel.Composition.CreationPolicy" /> for the exports used to satisfy this import. </para>
181 <Member MemberName="RequiredMetadata">
182 <MemberSignature Language="C#" Value="public virtual System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,Type>> RequiredMetadata { get; }" />
183 <MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IEnumerable`1<valuetype System.Collections.Generic.KeyValuePair`2<string, class System.Type>> RequiredMetadata" />
184 <MemberType>Property</MemberType>
186 <AssemblyVersion>4.0.0.0</AssemblyVersion>
189 <ReturnType>System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.Type>></ReturnType>
192 <value>To be added.</value>
194 <attribution license="cc4" from="Microsoft" modified="false" />
195 <para>Overrides of this property should never return null or return an <see cref="T:System.Collections.Generic.IEnumerable`1" /> collection that contains an element that is null. If the definition does not contain required metadata, return an empty <see cref="T:System.Collections.Generic.IEnumerable`1" /> collection instead.</para>
198 <attribution license="cc4" from="Microsoft" modified="false" />
199 <para>Gets the metadata names of the export required by the import definition.</para>
203 <Member MemberName="RequiredTypeIdentity">
204 <MemberSignature Language="C#" Value="public virtual string RequiredTypeIdentity { get; }" />
205 <MemberSignature Language="ILAsm" Value=".property instance string RequiredTypeIdentity" />
206 <MemberType>Property</MemberType>
208 <AssemblyVersion>4.0.0.0</AssemblyVersion>
211 <ReturnType>System.String</ReturnType>
214 <value>To be added.</value>
215 <remarks>To be added.</remarks>
217 <attribution license="cc4" from="Microsoft" modified="false" />
218 <para>Gets the expected type of the export that matches this <see cref="T:System.ComponentModel.Composition.Primitives.ContractBasedImportDefinition" />.</para>
222 <Member MemberName="ToString">
223 <MemberSignature Language="C#" Value="public override string ToString ();" />
224 <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
225 <MemberType>Method</MemberType>
227 <AssemblyVersion>4.0.0.0</AssemblyVersion>
230 <ReturnType>System.String</ReturnType>
234 <summary>To be added.</summary>
235 <remarks>To be added.</remarks>
237 <attribution license="cc4" from="Microsoft" modified="false" />
238 <para>Returns <see cref="T:System.String" />.</para>