[jit] Enable partial generic sharing when not using AOT as an experiment.
[mono.git] / mcs / class / Managed.Windows.Forms / Documentation / en / System.Windows.Forms / ApplicationContext.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="ApplicationContext" FullName="System.Windows.Forms.ApplicationContext">
3   <TypeSignature Language="C#" Value="public class ApplicationContext : IDisposable" />
4   <AssemblyInfo>
5     <AssemblyName>System.Windows.Forms</AssemblyName>
6     <AssemblyVersion>1.0.5000.0</AssemblyVersion>
7     <AssemblyVersion>2.0.0.0</AssemblyVersion>
8   </AssemblyInfo>
9   <Base>
10     <BaseTypeName>System.Object</BaseTypeName>
11   </Base>
12   <Interfaces>
13     <Interface>
14       <InterfaceName>System.IDisposable</InterfaceName>
15     </Interface>
16   </Interfaces>
17   <Docs>
18     <remarks>
19       <attribution license="cc4" from="Microsoft" modified="false" />
20       <para>You can use the <see cref="T:System.Windows.Forms.ApplicationContext" /> class to redefine the circumstances that cause a message loop to exit. By default, the <see cref="T:System.Windows.Forms.ApplicationContext" /> listens to the <see cref="E:System.Windows.Forms.Form.Closed" /> event on the application's main <see cref="T:System.Windows.Forms.Form" />, then exits the thread's message loop.</para>
21     </remarks>
22     <summary>
23       <attribution license="cc4" from="Microsoft" modified="false" />
24       <para>Specifies the contextual information about an application thread.</para>
25     </summary>
26   </Docs>
27   <Members>
28     <Member MemberName=".ctor">
29       <MemberSignature Language="C#" Value="public ApplicationContext ();" />
30       <MemberType>Constructor</MemberType>
31       <Parameters />
32       <Docs>
33         <remarks>To be added.</remarks>
34         <summary>
35           <attribution license="cc4" from="Microsoft" modified="false" />
36           <para>Initializes a new instance of the <see cref="T:System.Windows.Forms.ApplicationContext" /> class with no context.</para>
37         </summary>
38       </Docs>
39       <AssemblyInfo>
40         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
41         <AssemblyVersion>2.0.0.0</AssemblyVersion>
42       </AssemblyInfo>
43     </Member>
44     <Member MemberName=".ctor">
45       <MemberSignature Language="C#" Value="public ApplicationContext (System.Windows.Forms.Form mainForm);" />
46       <MemberType>Constructor</MemberType>
47       <Parameters>
48         <Parameter Name="mainForm" Type="System.Windows.Forms.Form" />
49       </Parameters>
50       <Docs>
51         <remarks>
52           <attribution license="cc4" from="Microsoft" modified="false" />
53           <para>If <see cref="M:System.Windows.Forms.ApplicationContext.OnMainFormClosed(System.Object,System.EventArgs)" /> is not overridden, the message loop of the thread terminates when <see cref="P:System.Windows.Forms.ApplicationContext.MainForm" /> is closed.</para>
54         </remarks>
55         <summary>
56           <attribution license="cc4" from="Microsoft" modified="false" />
57           <para>Initializes a new instance of the <see cref="T:System.Windows.Forms.ApplicationContext" /> class with the specified <see cref="T:System.Windows.Forms.Form" />.</para>
58         </summary>
59         <param name="mainForm">
60           <attribution license="cc4" from="Microsoft" modified="false" />The main <see cref="T:System.Windows.Forms.Form" /> of the application to use for context. </param>
61       </Docs>
62       <AssemblyInfo>
63         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
64         <AssemblyVersion>2.0.0.0</AssemblyVersion>
65       </AssemblyInfo>
66     </Member>
67     <Member MemberName="Dispose">
68       <MemberSignature Language="C#" Value="public void Dispose ();" />
69       <MemberType>Method</MemberType>
70       <ReturnValue>
71         <ReturnType>System.Void</ReturnType>
72       </ReturnValue>
73       <Parameters />
74       <Docs>
75         <remarks>
76           <attribution license="cc4" from="Microsoft" modified="false" />
77           <para>Call <see cref="M:System.Windows.Forms.ApplicationContext.Dispose" /> when you are finished using the <see cref="T:System.Windows.Forms.ApplicationContext" />. The <see cref="M:System.Windows.Forms.ApplicationContext.Dispose" /> method leaves the <see cref="T:System.Windows.Forms.ApplicationContext" /> in an unusable state. After calling <see cref="M:System.Windows.Forms.ApplicationContext.Dispose" />, you must release all references to the <see cref="T:System.Windows.Forms.ApplicationContext" /> so the garbage collector can reclaim the memory that the <see cref="T:System.Windows.Forms.ApplicationContext" /> was occupying. For more information, see <format type="text/html"><a href="a17b0066-71c2-4ba4-9822-8e19332fc213">Cleaning Up Unmanaged Resources</a></format> and <format type="text/html"><a href="eb4e1af0-3b48-4fbc-ad4e-fc2f64138bf9">Implementing a Dispose Method</a></format>. </para>
78           <block subset="none" type="note">
79             <para>Always call <see cref="M:System.Windows.Forms.ApplicationContext.Dispose" /> before you release your last reference to the <see cref="T:System.Windows.Forms.ApplicationContext" />. Otherwise, the resources it is using will not be freed until the garbage collector calls the <see cref="T:System.Windows.Forms.ApplicationContext" /> object's Finalize method.</para>
80           </block>
81         </remarks>
82         <summary>
83           <attribution license="cc4" from="Microsoft" modified="false" />
84           <para>Releases all resources used by the <see cref="T:System.Windows.Forms.ApplicationContext" />.</para>
85         </summary>
86       </Docs>
87       <AssemblyInfo>
88         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
89         <AssemblyVersion>2.0.0.0</AssemblyVersion>
90       </AssemblyInfo>
91     </Member>
92     <Member MemberName="Dispose">
93       <MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
94       <MemberType>Method</MemberType>
95       <ReturnValue>
96         <ReturnType>System.Void</ReturnType>
97       </ReturnValue>
98       <Parameters>
99         <Parameter Name="disposing" Type="System.Boolean" />
100       </Parameters>
101       <Docs>
102         <remarks>
103           <attribution license="cc4" from="Microsoft" modified="false" />
104           <para>This method is called by the public Dispose() method and the <see cref="M:System.Object.Finalize" /> method. Dispose() invokes the protected <see cref="M:System.Windows.Forms.ApplicationContext.Dispose(System.Boolean)" /> method with the <paramref name="disposing" /> parameter set to true. <see cref="M:System.Object.Finalize" /> invokes Dispose with <paramref name="disposing" /> set to false.</para>
105           <para>When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.Windows.Forms.ApplicationContext" /> references. This method invokes the Dispose() method of each referenced object.</para>
106         </remarks>
107         <summary>
108           <attribution license="cc4" from="Microsoft" modified="false" />
109           <para>Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.ApplicationContext" /> and optionally releases the managed resources.</para>
110         </summary>
111         <param name="disposing">
112           <attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
113       </Docs>
114       <AssemblyInfo>
115         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
116         <AssemblyVersion>2.0.0.0</AssemblyVersion>
117       </AssemblyInfo>
118     </Member>
119     <Member MemberName="ExitThread">
120       <MemberSignature Language="C#" Value="public void ExitThread ();" />
121       <MemberType>Method</MemberType>
122       <ReturnValue>
123         <ReturnType>System.Void</ReturnType>
124       </ReturnValue>
125       <Parameters />
126       <Docs>
127         <remarks>
128           <attribution license="cc4" from="Microsoft" modified="false" />
129           <para>This method calls <see cref="M:System.Windows.Forms.ApplicationContext.ExitThreadCore" />.</para>
130           <block subset="none" type="note">
131             <para>
132               <see cref="M:System.Windows.Forms.ApplicationContext.ExitThread" /> and <see cref="M:System.Windows.Forms.ApplicationContext.ExitThreadCore" /> do not actually cause the thread to terminate. These methods raise the <see cref="E:System.Windows.Forms.Application.ThreadExit" /> event to which the <see cref="T:System.Windows.Forms.Application" /> object listens. The <see cref="T:System.Windows.Forms.Application" /> object then terminates the thread.</para>
133           </block>
134         </remarks>
135         <summary>
136           <attribution license="cc4" from="Microsoft" modified="false" />
137           <para>Terminates the message loop of the thread.</para>
138         </summary>
139       </Docs>
140       <AssemblyInfo>
141         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
142         <AssemblyVersion>2.0.0.0</AssemblyVersion>
143       </AssemblyInfo>
144     </Member>
145     <Member MemberName="ExitThreadCore">
146       <MemberSignature Language="C#" Value="protected virtual void ExitThreadCore ();" />
147       <MemberType>Method</MemberType>
148       <ReturnValue>
149         <ReturnType>System.Void</ReturnType>
150       </ReturnValue>
151       <Parameters />
152       <Docs>
153         <remarks>
154           <attribution license="cc4" from="Microsoft" modified="false" />
155           <para>This method is called from <see cref="M:System.Windows.Forms.ApplicationContext.ExitThread" />.</para>
156           <block subset="none" type="note">
157             <para>
158               <see cref="M:System.Windows.Forms.ApplicationContext.ExitThread" /> and <see cref="M:System.Windows.Forms.ApplicationContext.ExitThreadCore" /> do not actually cause the thread to terminate. These methods raise the <see cref="E:System.Windows.Forms.Application.ThreadExit" /> event to which the <see cref="T:System.Windows.Forms.Application" /> object listens. The <see cref="T:System.Windows.Forms.Application" /> object then terminates the thread.</para>
159           </block>
160         </remarks>
161         <summary>
162           <attribution license="cc4" from="Microsoft" modified="false" />
163           <para>Terminates the message loop of the thread.</para>
164         </summary>
165       </Docs>
166       <AssemblyInfo>
167         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
168         <AssemblyVersion>2.0.0.0</AssemblyVersion>
169       </AssemblyInfo>
170     </Member>
171     <Member MemberName="Finalize">
172       <MemberSignature Language="C#" Value="~ApplicationContext ();" />
173       <MemberType>Method</MemberType>
174       <ReturnValue>
175         <ReturnType>System.Void</ReturnType>
176       </ReturnValue>
177       <Parameters />
178       <Docs>
179         <remarks>
180           <attribution license="cc4" from="Microsoft" modified="false" />
181           <para>This method overrides <see cref="M:System.Object.Finalize" /> and cleans up resources by calling Dispose(false). Override Dispose(Boolean) to customize the cleanup.</para>
182           <para>Application code should not call this method; an object's Finalize method is automatically invoked during garbage collection, unless finalization by the garbage collector has been disabled by a call to the <see cref="M:System.GC.SuppressFinalize(System.Object)" /> method.</para>
183           <para>For more information, see <format type="text/html"><a href="FD376774-1643-499B-869E-9546A3AEEA70">[&lt;topic://cpconFinalizeMethodscDestructors&gt;]</a></format>, <format type="text/html"><a href="A17B0066-71C2-4BA4-9822-8E19332FC213">[&lt;topic://cpconCleaningUpUnmanagedResources&gt;]</a></format>, and <format type="text/html"><a href="8026CB68-FE93-43FC-96C1-C09AD7D64CD3">[&lt;topic://cpconOverridingFinalizeMethod&gt;]</a></format>.</para>
184         </remarks>
185         <summary>
186           <attribution license="cc4" from="Microsoft" modified="false" />
187           <para>Attempts to free resources and perform other cleanup operations before the application context is reclaimed by garbage collection.</para>
188         </summary>
189       </Docs>
190       <AssemblyInfo>
191         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
192         <AssemblyVersion>2.0.0.0</AssemblyVersion>
193       </AssemblyInfo>
194     </Member>
195     <Member MemberName="MainForm">
196       <MemberSignature Language="C#" Value="public System.Windows.Forms.Form MainForm { set; get; }" />
197       <MemberType>Property</MemberType>
198       <ReturnValue>
199         <ReturnType>System.Windows.Forms.Form</ReturnType>
200       </ReturnValue>
201       <Docs>
202         <value>To be added.</value>
203         <remarks>
204           <attribution license="cc4" from="Microsoft" modified="false" />
205           <para>This property determines the main <see cref="T:System.Windows.Forms.Form" /> for this context. This property can change at any time. If <see cref="M:System.Windows.Forms.ApplicationContext.OnMainFormClosed(System.Object,System.EventArgs)" /> is not overridden, the message loop of the thread terminates when the <paramref name="mainForm" /> parameter closes.</para>
206         </remarks>
207         <summary>
208           <attribution license="cc4" from="Microsoft" modified="false" />
209           <para>Gets or sets the <see cref="T:System.Windows.Forms.Form" /> to use as context.</para>
210         </summary>
211       </Docs>
212       <AssemblyInfo>
213         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
214         <AssemblyVersion>2.0.0.0</AssemblyVersion>
215       </AssemblyInfo>
216     </Member>
217     <Member MemberName="OnMainFormClosed">
218       <MemberSignature Language="C#" Value="protected virtual void OnMainFormClosed (object sender, EventArgs e);" />
219       <MemberType>Method</MemberType>
220       <ReturnValue>
221         <ReturnType>System.Void</ReturnType>
222       </ReturnValue>
223       <Parameters>
224         <Parameter Name="sender" Type="System.Object" />
225         <Parameter Name="e" Type="System.EventArgs" />
226       </Parameters>
227       <Docs>
228         <remarks>
229           <attribution license="cc4" from="Microsoft" modified="false" />
230           <para>The default implementation of this method calls <see cref="M:System.Windows.Forms.ApplicationContext.ExitThreadCore" />.</para>
231         </remarks>
232         <summary>
233           <attribution license="cc4" from="Microsoft" modified="false" />
234           <para>Calls <see cref="M:System.Windows.Forms.ApplicationContext.ExitThreadCore" />, which raises the <see cref="E:System.Windows.Forms.ApplicationContext.ThreadExit" /> event.</para>
235         </summary>
236         <param name="sender">
237           <attribution license="cc4" from="Microsoft" modified="false" />The object that raised the event. </param>
238         <param name="e">
239           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.EventArgs" /> that contains the event data. </param>
240       </Docs>
241       <AssemblyInfo>
242         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
243         <AssemblyVersion>2.0.0.0</AssemblyVersion>
244       </AssemblyInfo>
245     </Member>
246     <Member MemberName="Tag">
247       <MemberSignature Language="C#" Value="public object Tag { set; get; }" />
248       <MemberType>Property</MemberType>
249       <AssemblyInfo>
250         <AssemblyVersion>2.0.0.0</AssemblyVersion>
251       </AssemblyInfo>
252       <Attributes>
253         <Attribute>
254           <AttributeName>System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))</AttributeName>
255         </Attribute>
256         <Attribute>
257           <AttributeName>System.ComponentModel.Localizable(false)</AttributeName>
258         </Attribute>
259         <Attribute>
260           <AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
261         </Attribute>
262         <Attribute>
263           <AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
264         </Attribute>
265       </Attributes>
266       <ReturnValue>
267         <ReturnType>System.Object</ReturnType>
268       </ReturnValue>
269       <Docs>
270         <value>To be added.</value>
271         <remarks>
272           <attribution license="cc4" from="Microsoft" modified="false" />
273           <para>Any type derived from the <see cref="T:System.Object" /> class can be assigned to this property. If the <see cref="P:System.Windows.Forms.ApplicationContext.Tag" /> property is set through the Windows Forms designer, only text can be assigned.</para>
274           <para>A common use for the <see cref="P:System.Windows.Forms.ApplicationContext.Tag" /> property is to store data that is closely associated with the control. For example, if you have a control that displays information about a customer, you might store a <see cref="T:System.Data.DataSet" /> that contains the customer's order history in that control's <see cref="P:System.Windows.Forms.ApplicationContext.Tag" /> property so the data can be accessed quickly.</para>
275         </remarks>
276         <summary>
277           <attribution license="cc4" from="Microsoft" modified="false" />
278           <para>Gets or sets an object that contains data about the control.</para>
279         </summary>
280       </Docs>
281     </Member>
282     <Member MemberName="ThreadExit">
283       <MemberSignature Language="C#" Value="public event EventHandler ThreadExit;" />
284       <MemberType>Event</MemberType>
285       <ReturnValue>
286         <ReturnType>System.EventHandler</ReturnType>
287       </ReturnValue>
288       <Docs>
289         <remarks>To be added.</remarks>
290         <summary>
291           <attribution license="cc4" from="Microsoft" modified="false" />
292           <para>Occurs when the message loop of the thread should be terminated, by calling <see cref="M:System.Windows.Forms.ApplicationContext.ExitThread" />.</para>
293         </summary>
294       </Docs>
295       <AssemblyInfo>
296         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
297         <AssemblyVersion>2.0.0.0</AssemblyVersion>
298       </AssemblyInfo>
299     </Member>
300   </Members>
301 </Type>