[mcs] Validate more nameof argument expressions
[mono.git] / mcs / class / System.ComponentModel.Composition / Documentation / en / System.ComponentModel.Composition / CreationPolicy.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="CreationPolicy" FullName="System.ComponentModel.Composition.CreationPolicy">
3   <TypeSignature Language="C#" Value="public enum CreationPolicy" />
4   <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed CreationPolicy extends System.Enum" />
5   <AssemblyInfo>
6     <AssemblyName>System.ComponentModel.Composition</AssemblyName>
7     <AssemblyVersion>4.0.0.0</AssemblyVersion>
8   </AssemblyInfo>
9   <Base>
10     <BaseTypeName>System.Enum</BaseTypeName>
11   </Base>
12   <Docs>
13     <remarks>
14       <attribution license="cc4" from="Microsoft" modified="false" />
15       <para>In the course of composition, the <see cref="T:System.ComponentModel.Composition.Hosting.CompositionContainer" /> needs instances of the objects described by exports in order to fill imports. If a one export is used to fill multiple imports, there are two possible behaviors. Either a single instance of the exported object is created, and a reference to the same object is given to every importer, or a separate instance of the exported object is created for each importer. </para>
16       <para>Which behavior occurs depends on the <see cref="P:System.ComponentModel.Composition.PartCreationPolicyAttribute.CreationPolicy" /> property of the <see cref="T:System.ComponentModel.Composition.PartCreationPolicyAttribute" /> attached to the export and the <see cref="P:System.ComponentModel.Composition.ImportAttribute.RequiredCreationPolicy" /> of the <see cref="T:System.ComponentModel.Composition.ImportAttribute" />. Both of which will contain a value from the <see cref="T:System.ComponentModel.Composition.CreationPolicy" /> enumeration. If the policies are incompatible, that export will not be considered a match for the given import. The following table summarizes the interaction of these two properties.</para>
17       <list type="table">
18         <listheader>
19           <item>
20             <term>
21               <para>
22                 <see cref="P:System.ComponentModel.Composition.ImportAttribute.RequiredCreationPolicy" />
23               </para>
24             </term>
25             <description>
26               <para>Export's <see cref="P:System.ComponentModel.Composition.PartCreationPolicyAttribute.CreationPolicy" /> specifies <see cref="F:System.ComponentModel.Composition.CreationPolicy.Any" /> or none specified.</para>
27             </description>
28             <description>
29               <para>Export's <see cref="P:System.ComponentModel.Composition.PartCreationPolicyAttribute.CreationPolicy" /> specifies <see cref="F:System.ComponentModel.Composition.CreationPolicy.Shared" /></para>
30             </description>
31             <description>
32               <para>Export's <see cref="P:System.ComponentModel.Composition.PartCreationPolicyAttribute.CreationPolicy" /> specifies <see cref="F:System.ComponentModel.Composition.CreationPolicy.NonShared" /></para>
33             </description>
34           </item>
35         </listheader>
36         <item>
37           <term>
38             <para>
39               <see cref="F:System.ComponentModel.Composition.CreationPolicy.Any" />
40             </para>
41           </term>
42           <description>
43             <para>A single, shared instance of the exported object will be created.</para>
44           </description>
45           <description>
46             <para>A single, shared instance of the exported object will be created.</para>
47           </description>
48           <description>
49             <para>A new instance of the exported object will be created for each importer.</para>
50           </description>
51         </item>
52         <item>
53           <term>
54             <para>
55               <see cref="F:System.ComponentModel.Composition.CreationPolicy.Shared" />
56             </para>
57           </term>
58           <description>
59             <para>A single, shared instance of the exported object will be created.</para>
60           </description>
61           <description>
62             <para>A single, shared instance of the exported object will be created.</para>
63           </description>
64           <description>
65             <para>The export will not be considered a match for the import.</para>
66           </description>
67         </item>
68         <item>
69           <term>
70             <para>
71               <see cref="F:System.ComponentModel.Composition.CreationPolicy.NonShared" />
72             </para>
73           </term>
74           <description>
75             <para>A new instance of the exported object will be created for each importer.</para>
76           </description>
77           <description>
78             <para>The export will not be considered a match for the import.</para>
79           </description>
80           <description>
81             <para>A new instance of the exported object will be created for each importer.</para>
82           </description>
83         </item>
84       </list>
85     </remarks>
86     <summary>
87       <attribution license="cc4" from="Microsoft" modified="false" />
88       <para>Specifies when and how a part will be instantiated.</para>
89     </summary>
90   </Docs>
91   <Members>
92     <Member MemberName="Any">
93       <MemberSignature Language="C#" Value="Any" />
94       <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ComponentModel.Composition.CreationPolicy Any = int32(0)" />
95       <MemberType>Field</MemberType>
96       <AssemblyInfo>
97         <AssemblyVersion>4.0.0.0</AssemblyVersion>
98       </AssemblyInfo>
99       <ReturnValue>
100         <ReturnType>System.ComponentModel.Composition.CreationPolicy</ReturnType>
101       </ReturnValue>
102       <Docs>
103         <summary>
104           <attribution license="cc4" from="Microsoft" modified="false" />
105           <para>Specifies that the <see cref="T:System.ComponentModel.Composition.Hosting.CompositionContainer" /> will use the most appropriate <see cref="T:System.ComponentModel.Composition.CreationPolicy" /> for the part given the current context. This is the default <see cref="T:System.ComponentModel.Composition.CreationPolicy" />. By default, <see cref="T:System.ComponentModel.Composition.Hosting.CompositionContainer" /> will use <see cref="F:System.ComponentModel.Composition.CreationPolicy.Shared" />, unless the <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" /> or importer requests <see cref="F:System.ComponentModel.Composition.CreationPolicy.NonShared" />.</para>
106         </summary>
107       </Docs>
108     </Member>
109     <Member MemberName="NewScope">
110       <MemberSignature Language="C#" Value="NewScope" />
111       <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ComponentModel.Composition.CreationPolicy NewScope = int32(3)" />
112       <MemberType>Field</MemberType>
113       <AssemblyInfo>
114         <AssemblyVersion>4.0.0.0</AssemblyVersion>
115       </AssemblyInfo>
116       <ReturnValue>
117         <ReturnType>System.ComponentModel.Composition.CreationPolicy</ReturnType>
118       </ReturnValue>
119       <Docs>
120         <summary>To be added.</summary>
121       </Docs>
122     </Member>
123     <Member MemberName="NonShared">
124       <MemberSignature Language="C#" Value="NonShared" />
125       <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ComponentModel.Composition.CreationPolicy NonShared = int32(2)" />
126       <MemberType>Field</MemberType>
127       <AssemblyInfo>
128         <AssemblyVersion>4.0.0.0</AssemblyVersion>
129       </AssemblyInfo>
130       <ReturnValue>
131         <ReturnType>System.ComponentModel.Composition.CreationPolicy</ReturnType>
132       </ReturnValue>
133       <Docs>
134         <summary>
135           <attribution license="cc4" from="Microsoft" modified="false" />
136           <para>Specifies that a new non-shared instance of the associated <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" /> will be created by the <see cref="T:System.ComponentModel.Composition.Hosting.CompositionContainer" /> for every requestor.</para>
137         </summary>
138       </Docs>
139     </Member>
140     <Member MemberName="Shared">
141       <MemberSignature Language="C#" Value="Shared" />
142       <MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.ComponentModel.Composition.CreationPolicy Shared = int32(1)" />
143       <MemberType>Field</MemberType>
144       <AssemblyInfo>
145         <AssemblyVersion>4.0.0.0</AssemblyVersion>
146       </AssemblyInfo>
147       <ReturnValue>
148         <ReturnType>System.ComponentModel.Composition.CreationPolicy</ReturnType>
149       </ReturnValue>
150       <Docs>
151         <summary>
152           <attribution license="cc4" from="Microsoft" modified="false" />
153           <para>Specifies that a single shared instance of the associated <see cref="T:System.ComponentModel.Composition.Primitives.ComposablePart" /> will be created by the <see cref="T:System.ComponentModel.Composition.Hosting.CompositionContainer" /> and shared by all requestors.</para>
154         </summary>
155       </Docs>
156     </Member>
157   </Members>
158 </Type>