[jit] Enable partial generic sharing when not using AOT as an experiment.
[mono.git] / mcs / class / Managed.Windows.Forms / Documentation / en / System.Windows.Forms / ListBindingHelper.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <Type Name="ListBindingHelper" FullName="System.Windows.Forms.ListBindingHelper">
3   <TypeSignature Language="C#" Value="public static class ListBindingHelper" />
4   <AssemblyInfo>
5     <AssemblyName>System.Windows.Forms</AssemblyName>
6     <AssemblyVersion>2.0.0.0</AssemblyVersion>
7   </AssemblyInfo>
8   <Base>
9     <BaseTypeName>System.Object</BaseTypeName>
10   </Base>
11   <Interfaces />
12   <Docs>
13     <remarks>
14       <attribution license="cc4" from="Microsoft" modified="false" />
15       <para>This class is used by classes such as <see cref="T:System.Windows.Forms.BindingSource" />.</para>
16       <para>Note that for Smartphone applications, this class requires Windows Mobile Version 5.0 software for Smartphones.</para>
17     </remarks>
18     <summary>
19       <attribution license="cc4" from="Microsoft" modified="false" />
20       <para>Provides functionality to discover a bindable list and the properties of the items contained in the list when they differ from the public properties of the object to which they bind.</para>
21     </summary>
22   </Docs>
23   <Members>
24     <Member MemberName="GetList">
25       <MemberSignature Language="C#" Value="public static object GetList (object list);" />
26       <MemberType>Method</MemberType>
27       <AssemblyInfo>
28         <AssemblyVersion>2.0.0.0</AssemblyVersion>
29       </AssemblyInfo>
30       <ReturnValue>
31         <ReturnType>System.Object</ReturnType>
32       </ReturnValue>
33       <Parameters>
34         <Parameter Name="list" Type="System.Object" />
35       </Parameters>
36       <Docs>
37         <remarks>
38           <attribution license="cc4" from="Microsoft" modified="false" />
39           <para>If the data source specified by the <paramref name="list" /> parameter implements the <see cref="T:System.ComponentModel.IListSource" /> interface, then the <see cref="M:System.Windows.Forms.ListBindingHelper.GetList(System.Object)" /> method will return an object of type <see cref="T:System.Collections.IList" /> that represents the associated list. Otherwise, this method will just return the specified data source since there is no underlying list.</para>
40         </remarks>
41         <summary>
42           <attribution license="cc4" from="Microsoft" modified="false" />
43           <para>Returns a list associated with the specified data source.</para>
44         </summary>
45         <returns>
46           <attribution license="cc4" from="Microsoft" modified="false" />
47           <para>An <see cref="T:System.Object" /> representing the underlying list if it exists; otherwise, the original data source specified by <paramref name="list" />.</para>
48         </returns>
49         <param name="list">
50           <attribution license="cc4" from="Microsoft" modified="false" />The data source to examine for its underlying list.</param>
51       </Docs>
52     </Member>
53     <Member MemberName="GetList">
54       <MemberSignature Language="C#" Value="public static object GetList (object dataSource, string dataMember);" />
55       <MemberType>Method</MemberType>
56       <AssemblyInfo>
57         <AssemblyVersion>2.0.0.0</AssemblyVersion>
58       </AssemblyInfo>
59       <ReturnValue>
60         <ReturnType>System.Object</ReturnType>
61       </ReturnValue>
62       <Parameters>
63         <Parameter Name="dataSource" Type="System.Object" />
64         <Parameter Name="dataMember" Type="System.String" />
65       </Parameters>
66       <Docs>
67         <remarks>
68           <attribution license="cc4" from="Microsoft" modified="false" />
69           <para>If the data member is null or an empty string (""), the <see cref="M:System.Windows.Forms.ListBindingHelper.GetList(System.Object,System.String)" /> method returns <paramref name="dataSource" />. </para>
70           <para>If <paramref name="dataSource" /> is not a list, <see cref="M:System.Windows.Forms.ListBindingHelper.GetList(System.Object,System.String)" /> returns the value of the <paramref name="dataSource" /> property that matches the <paramref name="dataMember" /> value.</para>
71           <para>If <paramref name="dataSource" /> is a list, in that it implements either the <see cref="T:System.Windows.Forms.ICurrencyManagerProvider" /> or <see cref="T:System.Collections.IEnumerable" /> interfaces, then the underlying list is obtained by choosing an item from the list and querying that item for the value of the property named by <paramref name="dataMember" />. </para>
72         </remarks>
73         <summary>
74           <attribution license="cc4" from="Microsoft" modified="false" />
75           <para>Returns an object, typically a list, from the evaluation of a specified data source and optional data member.</para>
76         </summary>
77         <returns>
78           <attribution license="cc4" from="Microsoft" modified="false" />
79           <para>An <see cref="T:System.Object" /> representing the underlying list if it was found; otherwise, <paramref name="dataSource" />.</para>
80         </returns>
81         <param name="dataSource">
82           <attribution license="cc4" from="Microsoft" modified="false" />The data source from which to find the list.</param>
83         <param name="dataMember">
84           <attribution license="cc4" from="Microsoft" modified="false" />The name of the data source property that contains the list. This can be null.</param>
85       </Docs>
86     </Member>
87     <Member MemberName="GetListItemProperties">
88       <MemberSignature Language="C#" Value="public static System.ComponentModel.PropertyDescriptorCollection GetListItemProperties (object list);" />
89       <MemberType>Method</MemberType>
90       <AssemblyInfo>
91         <AssemblyVersion>2.0.0.0</AssemblyVersion>
92       </AssemblyInfo>
93       <ReturnValue>
94         <ReturnType>System.ComponentModel.PropertyDescriptorCollection</ReturnType>
95       </ReturnValue>
96       <Parameters>
97         <Parameter Name="list" Type="System.Object" />
98       </Parameters>
99       <Docs>
100         <remarks>
101           <attribution license="cc4" from="Microsoft" modified="false" />
102           <para>The <see cref="M:System.Windows.Forms.ListBindingHelper.GetListItemProperties(System.Object)" /> method is used to examine the collection of properties for a data source. The action of this method depends on the actual type of the <paramref name="list" /> parameter according to the following table:</para>
103           <list type="table">
104             <listheader>
105               <item>
106                 <term>
107                   <para>Parameter type</para>
108                 </term>
109                 <description>
110                   <para>Action</para>
111                 </description>
112               </item>
113             </listheader>
114             <item>
115               <term>
116                 <para>A type that is a list or collection of items.</para>
117               </term>
118               <description>
119                 <para>Returns a <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> describing the properties of the item type contained in the list.</para>
120               </description>
121             </item>
122             <item>
123               <term>
124                 <para>A type that is not a list or collection.</para>
125               </term>
126               <description>
127                 <para>Returns a <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> describing the properties of the type.</para>
128               </description>
129             </item>
130             <item>
131               <term>
132                 <para>null</para>
133               </term>
134               <description>
135                 <para>Returns an empty <see cref="T:System.ComponentModel.PropertyDescriptorCollection" />.</para>
136               </description>
137             </item>
138           </list>
139         </remarks>
140         <summary>
141           <attribution license="cc4" from="Microsoft" modified="false" />
142           <para>Returns the <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that describes the properties of an item type contained in a specified data source, or properties of the specified data source.</para>
143         </summary>
144         <returns>
145           <attribution license="cc4" from="Microsoft" modified="false" />
146           <para>The <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> containing the properties of the items contained in <paramref name="list" />, or properties of <paramref name="list." /></para>
147         </returns>
148         <param name="list">
149           <attribution license="cc4" from="Microsoft" modified="false" />The data source to examine for property information.</param>
150       </Docs>
151     </Member>
152     <Member MemberName="GetListItemProperties">
153       <MemberSignature Language="C#" Value="public static System.ComponentModel.PropertyDescriptorCollection GetListItemProperties (object list, System.ComponentModel.PropertyDescriptor[] listAccessors);" />
154       <MemberType>Method</MemberType>
155       <AssemblyInfo>
156         <AssemblyVersion>2.0.0.0</AssemblyVersion>
157       </AssemblyInfo>
158       <ReturnValue>
159         <ReturnType>System.ComponentModel.PropertyDescriptorCollection</ReturnType>
160       </ReturnValue>
161       <Parameters>
162         <Parameter Name="list" Type="System.Object" />
163         <Parameter Name="listAccessors" Type="System.ComponentModel.PropertyDescriptor[]" />
164       </Parameters>
165       <Docs>
166         <remarks>
167           <attribution license="cc4" from="Microsoft" modified="false" />
168           <para>The <see cref="M:System.Windows.Forms.ListBindingHelper.GetListItemProperties(System.Object,System.ComponentModel.PropertyDescriptor[])" /> method is useful when the data source has properties that are a collection of items and you need to know properties of the item type in the collection, not the properties of the collection type. </para>
169         </remarks>
170         <summary>
171           <attribution license="cc4" from="Microsoft" modified="false" />
172           <para>Returns the <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that describes the properties of an item type contained in a collection property of a data source. Uses the specified <see cref="T:System.ComponentModel.PropertyDescriptor" /> array to indicate which properties to examine.</para>
173         </summary>
174         <returns>
175           <attribution license="cc4" from="Microsoft" modified="false" />
176           <para>The <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> describing the properties of the item type contained in a collection property of the data source.</para>
177         </returns>
178         <param name="list">
179           <attribution license="cc4" from="Microsoft" modified="false" />The data source to be examined for property information.</param>
180         <param name="listAccessors">
181           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.ComponentModel.PropertyDescriptor" /> array describing which properties of the data source to examine. This can be null.</param>
182       </Docs>
183     </Member>
184     <Member MemberName="GetListItemProperties">
185       <MemberSignature Language="C#" Value="public static System.ComponentModel.PropertyDescriptorCollection GetListItemProperties (object dataSource, string dataMember, System.ComponentModel.PropertyDescriptor[] listAccessors);" />
186       <MemberType>Method</MemberType>
187       <AssemblyInfo>
188         <AssemblyVersion>2.0.0.0</AssemblyVersion>
189       </AssemblyInfo>
190       <ReturnValue>
191         <ReturnType>System.ComponentModel.PropertyDescriptorCollection</ReturnType>
192       </ReturnValue>
193       <Parameters>
194         <Parameter Name="dataSource" Type="System.Object" />
195         <Parameter Name="dataMember" Type="System.String" />
196         <Parameter Name="listAccessors" Type="System.ComponentModel.PropertyDescriptor[]" />
197       </Parameters>
198       <Docs>
199         <remarks>
200           <attribution license="cc4" from="Microsoft" modified="false" />
201           <para>The <paramref name="dataMember" /> parameter can be null, in which case the <see cref="M:System.Windows.Forms.ListBindingHelper.GetListItemProperties(System.Object,System.String,System.ComponentModel.PropertyDescriptor[])" /> method will return property descriptions using the data source and the <see cref="T:System.ComponentModel.PropertyDescriptor" /> array.</para>
202           <para>
203             <see cref="M:System.Windows.Forms.ListBindingHelper.GetListItemProperties(System.Object,System.ComponentModel.PropertyDescriptor[])" /> is useful when the data member has properties that are a collection of items and you need to know properties of the item type in the collection, not the properties of the collection type. </para>
204         </remarks>
205         <summary>
206           <attribution license="cc4" from="Microsoft" modified="false" />
207           <para>Returns the <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> that describes the properties of an item type contained in the specified data member of a data source. Uses the specified <see cref="T:System.ComponentModel.PropertyDescriptor" /> array to indicate which properties to examine.</para>
208         </summary>
209         <returns>
210           <attribution license="cc4" from="Microsoft" modified="false" />
211           <para>The <see cref="T:System.ComponentModel.PropertyDescriptorCollection" /> describing the properties of an item type contained in a collection property of the specified data source.</para>
212         </returns>
213         <param name="dataSource">
214           <attribution license="cc4" from="Microsoft" modified="false" />The data source to be examined for property information.</param>
215         <param name="dataMember">
216           <attribution license="cc4" from="Microsoft" modified="false" />The optional data member to be examined for property information. This can be null.</param>
217         <param name="listAccessors">
218           <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.ComponentModel.PropertyDescriptor" /> array describing which properties of the data member to examine. This can be null.</param>
219       </Docs>
220     </Member>
221     <Member MemberName="GetListItemType">
222       <MemberSignature Language="C#" Value="public static Type GetListItemType (object list);" />
223       <MemberType>Method</MemberType>
224       <AssemblyInfo>
225         <AssemblyVersion>2.0.0.0</AssemblyVersion>
226       </AssemblyInfo>
227       <ReturnValue>
228         <ReturnType>System.Type</ReturnType>
229       </ReturnValue>
230       <Parameters>
231         <Parameter Name="list" Type="System.Object" />
232       </Parameters>
233       <Docs>
234         <remarks>
235           <attribution license="cc4" from="Microsoft" modified="false" />
236           <para>If the <paramref name="list" /> parameter is not a list or array, the type returned will be that of the <paramref name="list" /> parameter itself.</para>
237         </remarks>
238         <summary>
239           <attribution license="cc4" from="Microsoft" modified="false" />
240           <para>Returns the data type of the items in the specified list.</para>
241         </summary>
242         <returns>
243           <attribution license="cc4" from="Microsoft" modified="false" />
244           <para>The <see cref="T:System.Type" /> of the items contained in the list.</para>
245         </returns>
246         <param name="list">
247           <attribution license="cc4" from="Microsoft" modified="false" />The list to be examined for type information. </param>
248       </Docs>
249     </Member>
250     <Member MemberName="GetListItemType">
251       <MemberSignature Language="C#" Value="public static Type GetListItemType (object dataSource, string dataMember);" />
252       <MemberType>Method</MemberType>
253       <AssemblyInfo>
254         <AssemblyVersion>2.0.0.0</AssemblyVersion>
255       </AssemblyInfo>
256       <ReturnValue>
257         <ReturnType>System.Type</ReturnType>
258       </ReturnValue>
259       <Parameters>
260         <Parameter Name="dataSource" Type="System.Object" />
261         <Parameter Name="dataMember" Type="System.String" />
262       </Parameters>
263       <Docs>
264         <remarks>
265           <attribution license="cc4" from="Microsoft" modified="false" />
266           <para>This version of the <see cref="M:System.Windows.Forms.ListBindingHelper.GetListItemType(System.Object,System.String)" /> method is used to determine the type of items used in complex or simple data-binding schemes. This static method may be useful in determining whether a proposed data-binding scheme is appropriate before attempting it.</para>
267           <para>If <paramref name="dataSource" /> is null, the property descriptors cannot be found for the list items of the specified data member, or the property descriptor for the list item is an <see cref="T:System.ComponentModel.ICustomTypeDescriptor" />, then this method returns the type of the <see cref="T:System.Object" /> class. </para>
268           <para>If <paramref name="dataMember" /> is null or empty, then this method returns the <see cref="T:System.Type" /> of the items in the data source, if it is a list; otherwise, this method returns the <see cref="T:System.Type" /> of the data source itself.</para>
269         </remarks>
270         <summary>
271           <attribution license="cc4" from="Microsoft" modified="false" />
272           <para>Returns the data type of the items in the specified data source.</para>
273         </summary>
274         <returns>
275           <attribution license="cc4" from="Microsoft" modified="false" />
276           <para>For complex data binding, the <see cref="T:System.Type" /> of the items represented by the <paramref name="dataMember" /> in the data source; otherwise, the <see cref="T:System.Type" /> of the item in the list itself.</para>
277         </returns>
278         <param name="dataSource">
279           <attribution license="cc4" from="Microsoft" modified="false" />The data source to examine for items. </param>
280         <param name="dataMember">
281           <attribution license="cc4" from="Microsoft" modified="false" />The optional name of the property on the data source that is to be used as the data member. This can be null.</param>
282       </Docs>
283     </Member>
284     <Member MemberName="GetListName">
285       <MemberSignature Language="C#" Value="public static string GetListName (object list, System.ComponentModel.PropertyDescriptor[] listAccessors);" />
286       <MemberType>Method</MemberType>
287       <AssemblyInfo>
288         <AssemblyVersion>2.0.0.0</AssemblyVersion>
289       </AssemblyInfo>
290       <ReturnValue>
291         <ReturnType>System.String</ReturnType>
292       </ReturnValue>
293       <Parameters>
294         <Parameter Name="list" Type="System.Object" />
295         <Parameter Name="listAccessors" Type="System.ComponentModel.PropertyDescriptor[]" />
296       </Parameters>
297       <Docs>
298         <remarks>
299           <attribution license="cc4" from="Microsoft" modified="false" />
300           <para>If <paramref name="listAccessors" /> is null or empty, the <see cref="M:System.Windows.Forms.ListBindingHelper.GetListName(System.Object,System.ComponentModel.PropertyDescriptor[])" /> method returns the name of the data source type.</para>
301         </remarks>
302         <summary>
303           <attribution license="cc4" from="Microsoft" modified="false" />
304           <para>Returns the name of an underlying list, given a data source and optional <see cref="T:System.ComponentModel.PropertyDescriptor" /> array.</para>
305         </summary>
306         <returns>
307           <attribution license="cc4" from="Microsoft" modified="false" />
308           <para>The name of the list in the data source, as described by <paramref name="listAccessors" />, or<paramref name=" " />the name of the data source type.</para>
309         </returns>
310         <param name="list">
311           <attribution license="cc4" from="Microsoft" modified="false" />The data source to examine for the list name.</param>
312         <param name="listAccessors">
313           <attribution license="cc4" from="Microsoft" modified="false" />An array of <see cref="T:System.ComponentModel.PropertyDescriptor" /> objects to find in the data source. This can be null.</param>
314       </Docs>
315     </Member>
316   </Members>
317 </Type>