Doc stub flush for the net_4_0 profile.
[mono.git] / mcs / class / corlib / Documentation / en / System.Security.Permissions / ReflectionPermission.xml
1 <Type Name="ReflectionPermission" FullName="System.Security.Permissions.ReflectionPermission" FullNameSP="System_Security_Permissions_ReflectionPermission" Maintainer="ecma">
2   <TypeSignature Language="ILASM" Value=".class public sealed serializable ReflectionPermission extends System.Security.CodeAccessPermission" />
3   <TypeSignature Language="C#" Value="public sealed class ReflectionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IBuiltInPermission, System.Security.Permissions.IUnrestrictedPermission" />
4   <MemberOfLibrary>Reflection</MemberOfLibrary>
5   <AssemblyInfo>
6     <AssemblyName>mscorlib</AssemblyName>
7     <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
8     <AssemblyVersion>1.0.5000.0</AssemblyVersion>
9     <AssemblyVersion>2.0.0.0</AssemblyVersion>
10     <AssemblyVersion>4.0.0.0</AssemblyVersion>
11   </AssemblyInfo>
12   <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
13   <Base>
14     <BaseTypeName>System.Security.CodeAccessPermission</BaseTypeName>
15   </Base>
16   <Interfaces>
17     <Interface>
18       <InterfaceName>System.Security.Permissions.IBuiltInPermission</InterfaceName>
19     </Interface>
20     <Interface>
21       <InterfaceName>System.Security.Permissions.IUnrestrictedPermission</InterfaceName>
22     </Interface>
23   </Interfaces>
24   <Docs>
25     <summary>
26       <para> Secures access to the metadata of non-public types and members through reflection.</para>
27     </summary>
28     <remarks>
29       <para>Code with the appropriate <see cref="T:System.Security.Permissions.ReflectionPermission" /> has
30    access to non-public members of a type .
31    Without <see cref="T:System.Security.Permissions.ReflectionPermission" /> ,
32    code can access only the public members of assemblies.</para>
33       <block subset="none" type="note">
34         <para> Without <see cref="T:System.Security.Permissions.ReflectionPermission" />,
35    untrusted code can perform the following operations on members of loaded
36    assemblies:</para>
37         <list type="bullet">
38           <item>
39             <term>
40       Obtain type information from metadata for public
41       types and members.</term>
42           </item>
43           <item>
44             <term>
45       Invoke public members.</term>
46           </item>
47           <item>
48             <term>
49       Invoke members defined with family access in the
50       calling code's base classes.</term>
51           </item>
52           <item>
53             <term>
54       Invoke members defined with assembly access in the
55       calling code's assembly.</term>
56           </item>
57           <item>
58             <term>
59       Invoke members defined with <see langword="FamilyAndAssembly" /> or
60    <see langword="FamilyOrAssembly" /> access in the calling code's 
61       base classes and/or assembly.</term>
62           </item>
63           <item>
64             <term>
65       Enumerate assemblies.</term>
66           </item>
67           <item>
68             <term>
69       Enumerate public types.</term>
70           </item>
71           <item>
72             <term>
73       Enumerate types in the calling
74       
75       code's assembly.</term>
76           </item>
77         </list>
78       </block>
79       <para>
80         <see cref="T:System.Security.Permissions.ReflectionPermission" /> instances
81 can allow untrusted code to obtain type and member
82 information, invoke members, and enumerate types that would otherwise be inaccessible. <block subset="none" type="note">Because <see cref="T:System.Security.Permissions.ReflectionPermission" /> can
83 provide access to members
84 and
85 information that were not intended for public
86 access, it is recommended that <see cref="T:System.Security.Permissions.ReflectionPermission" /> be
87 granted only to trusted code.</block></para>
88       <para>The XML encoding of a <see cref="T:System.Security.Permissions.ReflectionPermission" /> instance is defined below
89    in EBNF format. The following conventions are used: </para>
90       <list type="bullet">
91         <item>
92           <term>
93             <para> All non-literals in the grammar below are shown in normal type.</para>
94           </term>
95         </item>
96         <item>
97           <term>
98             <para> All literals are in bold font. </para>
99           </term>
100         </item>
101       </list>
102       <para> The following meta-language symbols are used: </para>
103       <list type="bullet">
104         <item>
105           <term>
106          '*' represents a meta-language symbol suffixing an
107          expression that can appear zero or more times.</term>
108         </item>
109         <item>
110           <term>
111          '?' represents a meta-language symbol suffixing an
112          expression that can appear zero or one time.</term>
113         </item>
114         <item>
115           <term>
116          '+' represents a meta-language symbol suffixing an
117          expression that can appear one or more times.</term>
118         </item>
119         <item>
120           <term>
121          '(',')' is used to group literals, non-literals or a
122          mixture of literals and non-literals.</term>
123         </item>
124         <item>
125           <term>
126          '|' denotes an exclusive disjunction between two
127          expressions.</term>
128         </item>
129         <item>
130           <term>
131          '::= ' denotes a production rule where a left hand
132          non-literal is replaced by a right hand expression containing literals,
133          non-literals or both.</term>
134         </item>
135       </list>
136       <para>BuildVersion refers to the build version of the shipping CLI. This is
137    specified as a dotted build number such as '2412.0' . </para>
138       <para>ECMAPubKeyToken ::= <see langword="b77a5c561934e089" /></para>
139       <para>ReflectionPermissionFlag = <see langword="MemberAccess" />
140 | <see langword="TypeInformation" /></para>
141       <para>Each ReflectionPermissionFlag can appear in the XML no more than once. For example, Flags=MemberAccess,MemberAccess is illegal.</para>
142       <para>The XML encoding of a <see cref="T:System.Security.Permissions.ReflectionPermission" />
143 instance is as follows:</para>
144       <para>ReflectionPermissionXML ::=</para>
145       <c>
146         <para>
147           <see langword="&lt;IPermission" />
148         </para>
149         <para>
150           <see langword="class=&quot;" />
151         </para>
152         <para>
153           <see langword="System.Security.Permissions.ReflectionPermission, mscorlib," />
154         </para>
155         <para>
156           <see langword="Version=1.0." />BuildVersion<see langword="," /></para>
157         <para>
158           <see langword="Culture=neutral," />
159         </para>
160         <para>
161           <see langword="PublicKeyToken=" />ECMAPubKeyToken<see langword="&quot;" /></para>
162         <para>
163           <see langword="version=&quot;1&quot;" />
164         </para>
165         <para>(</para>
166         <para>
167           <see langword="Unrestricted=&quot;true&quot; " />
168         </para>
169         <para>)</para>
170         <para>|</para>
171         <para>(</para>
172         <para>
173           <see langword="Flags=&quot;NoFlags" /> |
174 (ReflectionPermissionFlag (<see langword="," />ReflectionPermissionFlag)*<see langword="&quot;" /></para>
175         <para>) </para>
176         <para>
177           <see langword="/&gt;" />
178         </para>
179       </c>
180     </remarks>
181   </Docs>
182   <Members>
183     <Member MemberName=".ctor">
184       <MemberSignature Language="C#" Value="public ReflectionPermission (System.Security.Permissions.PermissionState state);" />
185       <MemberType>Constructor</MemberType>
186       <Parameters>
187         <Parameter Name="state" Type="System.Security.Permissions.PermissionState" />
188       </Parameters>
189       <Docs>
190         <param name="state">To be added.</param>
191         <summary>To be added.</summary>
192         <remarks>To be added.</remarks>
193       </Docs>
194       <AssemblyInfo>
195         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
196         <AssemblyVersion>2.0.0.0</AssemblyVersion>
197         <AssemblyVersion>4.0.0.0</AssemblyVersion>
198       </AssemblyInfo>
199     </Member>
200     <Member MemberName=".ctor">
201       <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(valuetype System.Security.Permissions.ReflectionPermissionFlag flag)" />
202       <MemberSignature Language="C#" Value="public ReflectionPermission (System.Security.Permissions.ReflectionPermissionFlag flag);" />
203       <MemberType>Constructor</MemberType>
204       <ReturnValue />
205       <Parameters>
206         <Parameter Name="flag" Type="System.Security.Permissions.ReflectionPermissionFlag" />
207       </Parameters>
208       <Docs>
209         <param name="flag">One or more <see cref="T:System.Security.Permissions.ReflectionPermissionFlag" /> values.</param>
210         <summary>
211           <para>Constructs and initializes a new instance of the <see cref="T:System.Security.Permissions.ReflectionPermission" /> class with the specified
212    access.</para>
213         </summary>
214         <remarks>To be added.</remarks>
215         <exception cref="T:System.ArgumentException">The <paramref name="flag" /> parameter contains a value that is not a combination of <see cref="T:System.Security.Permissions.ReflectionPermissionFlag" /> values.</exception>
216       </Docs>
217       <Excluded>0</Excluded>
218       <AssemblyInfo>
219         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
220         <AssemblyVersion>2.0.0.0</AssemblyVersion>
221         <AssemblyVersion>4.0.0.0</AssemblyVersion>
222       </AssemblyInfo>
223     </Member>
224     <Member MemberName="Copy">
225       <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Copy()" />
226       <MemberSignature Language="C#" Value="public override System.Security.IPermission Copy ();" />
227       <MemberType>Method</MemberType>
228       <ReturnValue>
229         <ReturnType>System.Security.IPermission</ReturnType>
230       </ReturnValue>
231       <Parameters />
232       <Docs>
233         <summary>
234           <para>Returns a new <see cref="T:System.Security.Permissions.ReflectionPermission" /> object containing the same values as the current 
235    instance.</para>
236         </summary>
237         <returns>
238           <para>A new <see cref="T:System.Security.Permissions.ReflectionPermission" /> instance that contains the same values as the current instance.</para>
239         </returns>
240         <remarks>
241           <block subset="none" type="note">
242             <para>The object returned by this method represents the same access to resources as 
243          the current instance.</para>
244             <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Copy" qualify="true" /> and is implemented to 
245       support the <see cref="T:System.Security.IPermission" /> interface.</para>
246           </block>
247         </remarks>
248       </Docs>
249       <Excluded>0</Excluded>
250       <AssemblyInfo>
251         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
252         <AssemblyVersion>2.0.0.0</AssemblyVersion>
253         <AssemblyVersion>4.0.0.0</AssemblyVersion>
254       </AssemblyInfo>
255     </Member>
256     <Member MemberName="Flags">
257       <MemberSignature Language="C#" Value="public System.Security.Permissions.ReflectionPermissionFlag Flags { set; get; }" />
258       <MemberType>Property</MemberType>
259       <ReturnValue>
260         <ReturnType>System.Security.Permissions.ReflectionPermissionFlag</ReturnType>
261       </ReturnValue>
262       <Docs>
263         <summary>To be added.</summary>
264         <value>To be added.</value>
265         <remarks>To be added.</remarks>
266       </Docs>
267       <AssemblyInfo>
268         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
269         <AssemblyVersion>2.0.0.0</AssemblyVersion>
270         <AssemblyVersion>4.0.0.0</AssemblyVersion>
271       </AssemblyInfo>
272     </Member>
273     <Member MemberName="FromXml">
274       <MemberSignature Language="ILASM" Value=".method public hidebysig virtual void FromXml(class System.Security.SecurityElement esd)" />
275       <MemberSignature Language="C#" Value="public override void FromXml (System.Security.SecurityElement esd);" />
276       <MemberType>Method</MemberType>
277       <ReturnValue>
278         <ReturnType>System.Void</ReturnType>
279       </ReturnValue>
280       <Parameters>
281         <Parameter Name="esd" Type="System.Security.SecurityElement" />
282       </Parameters>
283       <Docs>
284         <param name="esd">A <see cref="T:System.Security.SecurityElement" /> instance containing the XML encoding to use to reconstruct the state of a <see cref="T:System.Security.Permissions.ReflectionPermission" /> object.</param>
285         <summary>
286           <para>Reconstructs the state of a 
287    <see cref="T:System.Security.Permissions.ReflectionPermission" /> object using the specified XML
288       encoding.</para>
289         </summary>
290         <remarks>
291           <para>The state of the current instance is changed to the state encoded in 
292    <paramref name="esd" />.</para>
293           <block subset="none" type="note">
294             <para>For the XML encoding for this class, see the 
295       <see cref="T:System.Security.Permissions.ReflectionPermission" /> class 
296          page.</para>
297             <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.FromXml(System.Security.SecurityElement)" qualify="true" /> .</para>
298           </block>
299         </remarks>
300         <exception cref="T:System.ArgumentNullException">The <paramref name="esd" /> parameter is <see langword="null" />.</exception>
301         <exception cref="T:System.ArgumentException">
302           <para>The <paramref name="esd" /> parameter is not a <see cref="T:System.Security.Permissions.ReflectionPermission" /> element.</para>
303           <para>-or-</para>
304           <para>The <paramref name="esd" /> parameter's version number is not valid.</para>
305         </exception>
306       </Docs>
307       <Excluded>0</Excluded>
308       <AssemblyInfo>
309         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
310         <AssemblyVersion>2.0.0.0</AssemblyVersion>
311         <AssemblyVersion>4.0.0.0</AssemblyVersion>
312       </AssemblyInfo>
313     </Member>
314     <Member MemberName="Intersect">
315       <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Intersect(class System.Security.IPermission target)" />
316       <MemberSignature Language="C#" Value="public override System.Security.IPermission Intersect (System.Security.IPermission target);" />
317       <MemberType>Method</MemberType>
318       <ReturnValue>
319         <ReturnType>System.Security.IPermission</ReturnType>
320       </ReturnValue>
321       <Parameters>
322         <Parameter Name="target" Type="System.Security.IPermission" />
323       </Parameters>
324       <Docs>
325         <param name="target">A <see cref="T:System.Security.Permissions.ReflectionPermission" /> instance to intersect with the current instance. </param>
326         <summary>
327           <para>Returns a new <see cref="T:System.Security.Permissions.ReflectionPermission" /> object that is the intersection
328    of the current instance and the specified object.</para>
329         </summary>
330         <returns>
331           <para>A new <see cref="T:System.Security.Permissions.ReflectionPermission" /> instance that represents the intersection of the
332    current instance and <paramref name="target" />. If the intersection is empty, returns
333 <see langword="null" />. If <paramref name="target" /> is
334 <see langword="null" />, returns <see langword="null" /> 
335 .</para>
336         </returns>
337         <remarks>
338           <block subset="none" type="note">
339             <para>The intersection of two permissions is a permission that secures the
340          resources and operations secured by both permissions. Specifically, it
341          represents the minimum permission such that any demand that passes both
342          permissions will also pass their intersection.</para>
343             <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Intersect(System.Security.IPermission)" qualify="true" /> and is implemented to
344       support the <see cref="T:System.Security.IPermission" /> interface.</para>
345           </block>
346         </remarks>
347         <exception cref="T:System.ArgumentException">The <paramref name="target" /> parameter is not <see langword="null" /> and is not an instance of <see cref="T:System.Security.Permissions.ReflectionPermission" /> . </exception>
348       </Docs>
349       <Excluded>0</Excluded>
350       <AssemblyInfo>
351         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
352         <AssemblyVersion>2.0.0.0</AssemblyVersion>
353         <AssemblyVersion>4.0.0.0</AssemblyVersion>
354       </AssemblyInfo>
355     </Member>
356     <Member MemberName="IsSubsetOf">
357       <MemberSignature Language="ILASM" Value=".method public hidebysig virtual bool IsSubsetOf(class System.Security.IPermission target)" />
358       <MemberSignature Language="C#" Value="public override bool IsSubsetOf (System.Security.IPermission target);" />
359       <MemberType>Method</MemberType>
360       <ReturnValue>
361         <ReturnType>System.Boolean</ReturnType>
362       </ReturnValue>
363       <Parameters>
364         <Parameter Name="target" Type="System.Security.IPermission" />
365       </Parameters>
366       <Docs>
367         <param name="target">A <see cref="T:System.Security.Permissions.ReflectionPermission" /> instance that is to be tested for the subset relationship.</param>
368         <summary>
369           <para> Determines whether the current instance is a subset of
370       the specified object.</para>
371         </summary>
372         <returns>
373           <para>
374             <see langword="true" /> if the current instance is a subset of <paramref name="target" /> ;
375    otherwise,<see langword=" false" />. If the current instance is unrestricted, and
376 <paramref name="target" /> is not, returns <see langword="false" />. If <paramref name="target" /> is 
377    unrestricted, returns <see langword="true" />. If target is
378 <see langword="null" /> and the access level of the current instance is <see cref="F:System.Security.Permissions.ReflectionPermissionFlag.NoFlags" />, returns <see langword="true" />. If 
379    target is <see langword="null" /> and the access level of the current
380    instance is any value other than <see cref="F:System.Security.Permissions.ReflectionPermissionFlag.NoFlags" />, returns
381 <see langword="false" />.</para>
382         </returns>
383         <remarks>
384           <block subset="none" type="note">
385             <para>The current instance is a subset of <paramref name="target" /> if the current instance
386       specifies a set of accesses to resources that is wholly contained by
387    <paramref name="target" /> . For example, a permission that represents access to type
388       information is a subset of a permission that represents access to type information and members. </para>
389             <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.IsSubsetOf(System.Security.IPermission)" qualify="true" /> and is implemented to
390    support the <see cref="T:System.Security.IPermission" /> interface.</para>
391           </block>
392         </remarks>
393         <exception cref="T:System.ArgumentException">The <paramref name="target" /> parameter is not <see langword="null" /> and is not an instance of <see cref="T:System.Security.Permissions.ReflectionPermission" /> . </exception>
394       </Docs>
395       <Excluded>0</Excluded>
396       <AssemblyInfo>
397         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
398         <AssemblyVersion>2.0.0.0</AssemblyVersion>
399         <AssemblyVersion>4.0.0.0</AssemblyVersion>
400       </AssemblyInfo>
401     </Member>
402     <Member MemberName="IsUnrestricted">
403       <MemberSignature Language="C#" Value="public bool IsUnrestricted ();" />
404       <MemberType>Method</MemberType>
405       <ReturnValue>
406         <ReturnType>System.Boolean</ReturnType>
407       </ReturnValue>
408       <Parameters />
409       <Docs>
410         <summary>To be added.</summary>
411         <returns>To be added.</returns>
412         <remarks>To be added.</remarks>
413       </Docs>
414       <AssemblyInfo>
415         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
416         <AssemblyVersion>2.0.0.0</AssemblyVersion>
417         <AssemblyVersion>4.0.0.0</AssemblyVersion>
418       </AssemblyInfo>
419     </Member>
420     <Member MemberName="System.Security.Permissions.IBuiltInPermission.GetTokenIndex">
421       <MemberSignature Language="C#" Value="int IBuiltInPermission.GetTokenIndex ();" />
422       <MemberType>Method</MemberType>
423       <ReturnValue>
424         <ReturnType>System.Int32</ReturnType>
425       </ReturnValue>
426       <Parameters />
427       <Docs>
428         <summary>To be added.</summary>
429         <returns>To be added.</returns>
430         <remarks>To be added.</remarks>
431       </Docs>
432       <AssemblyInfo>
433         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
434         <AssemblyVersion>2.0.0.0</AssemblyVersion>
435         <AssemblyVersion>4.0.0.0</AssemblyVersion>
436       </AssemblyInfo>
437     </Member>
438     <Member MemberName="ToXml">
439       <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.SecurityElement ToXml()" />
440       <MemberSignature Language="C#" Value="public override System.Security.SecurityElement ToXml ();" />
441       <MemberType>Method</MemberType>
442       <ReturnValue>
443         <ReturnType>System.Security.SecurityElement</ReturnType>
444       </ReturnValue>
445       <Parameters />
446       <Docs>
447         <summary>
448           <para>Returns the XML encoding of the current instance.</para>
449         </summary>
450         <returns>
451           <para>A <see cref="T:System.Security.SecurityElement" /> containing the XML encoding of the state of the current
452    instance.</para>
453         </returns>
454         <remarks>
455           <block subset="none" type="note">
456             <para>For the XML encoding for this class, see the <see cref="T:System.Security.Permissions.ReflectionPermission" /> class page.</para>
457             <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.ToXml" qualify="true" /> .</para>
458           </block>
459         </remarks>
460       </Docs>
461       <Excluded>0</Excluded>
462       <AssemblyInfo>
463         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
464         <AssemblyVersion>2.0.0.0</AssemblyVersion>
465         <AssemblyVersion>4.0.0.0</AssemblyVersion>
466       </AssemblyInfo>
467     </Member>
468     <Member MemberName="Union">
469       <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Security.IPermission Union(class System.Security.IPermission other)" />
470       <MemberSignature Language="C#" Value="public override System.Security.IPermission Union (System.Security.IPermission other);" />
471       <MemberType>Method</MemberType>
472       <ReturnValue>
473         <ReturnType>System.Security.IPermission</ReturnType>
474       </ReturnValue>
475       <Parameters>
476         <Parameter Name="other" Type="System.Security.IPermission" />
477       </Parameters>
478       <Docs>
479         <param name="other">A <see cref="T:System.Security.Permissions.ReflectionPermission" /> instance to be combined with the current instance. </param>
480         <summary>
481           <para>Returns a new <see cref="T:System.Security.Permissions.ReflectionPermission" /> object that is the union of the
482    current instance and the specified object.</para>
483         </summary>
484         <returns>
485           <para>A new <see cref="T:System.Security.Permissions.ReflectionPermission" /> 
486 instance that represents the union of the current instance and <paramref name="other" />. If
487 the current instance or <paramref name="other " />is unrestricted, returns a
488 <see cref="T:System.Security.Permissions.ReflectionPermission" /> instance that is 
489 unrestricted. If <paramref name="other" /> is <see langword="null" />, returns a copy of the
490 current instance.</para>
491         </returns>
492         <remarks>
493           <block subset="none" type="note">
494             <para>The result of a call to <see cref="M:System.Security.Permissions.ReflectionPermission.Union(System.Security.IPermission)" /> 
495    is a permission that represents all of the access
496    to resources represented by both the current instance and <paramref name="other" />. Any
497    demand that passes either the current instance or <paramref name="other " />passes their
498    union.</para>
499             <para>This method overrides <see cref="M:System.Security.CodeAccessPermission.Union(System.Security.IPermission)" qualify="true" /> and is implemented to
500 support the <see cref="T:System.Security.IPermission" /> interface.</para>
501           </block>
502         </remarks>
503         <exception cref="T:System.ArgumentException">The <paramref name="other " />parameter is not <see langword="null" /> and is not an instance of <see cref="T:System.Security.Permissions.ReflectionPermission" /> .</exception>
504       </Docs>
505       <Excluded>0</Excluded>
506       <AssemblyInfo>
507         <AssemblyVersion>1.0.5000.0</AssemblyVersion>
508         <AssemblyVersion>2.0.0.0</AssemblyVersion>
509         <AssemblyVersion>4.0.0.0</AssemblyVersion>
510       </AssemblyInfo>
511     </Member>
512   </Members>
513   <TypeExcluded>0</TypeExcluded>
514   <Attributes>
515     <Attribute>
516       <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
517     </Attribute>
518   </Attributes>
519 </Type>