Added piles of new enumerations from Sergey.
[mono.git] / mcs / class / corlib / System.Runtime.CompilerServices / MethodImplOptions.cs
1 // MethodImplOptions.cs\r
2 //\r
3 // This code was automatically generated from\r
4 // ECMA CLI XML Library Specification.\r
5 // Generator: libgen.xsl\r
6 // Source file: AllTypes.xml\r
7 // URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml\r
8 //\r
9 // (C) 2001 Ximian, Inc.  http://www.ximian.com\r
10 \r
11 \r
12 namespace System.Runtime.CompilerServices {\r
13 \r
14 \r
15         /// <summary>\r
16         /// <para>Defines the details of how a method is implemented.</para>\r
17         /// </summary>\r
18         /// <remarks>\r
19         /// <para>This enumeration is used by <see cref="T:System.Runtime.CompilerServices.MethodImplAttribute" />.\r
20         ///    </para>\r
21         /// </remarks>\r
22         public enum MethodImplOptions {\r
23 \r
24                 /// <summary><para>Specifies that the method is implemented in unmanaged code.</para></summary>\r
25                 Unmanaged = 4,\r
26 \r
27                 /// <summary><para> Specifies that the method is declared, but its implementation is\r
28                 ///       provided elsewhere. </para><para><block subset="none" type="note">For most languages, it is recommended \r
29                 ///       that the notion of "forward" be attached to methods using language syntax\r
30                 ///       instead of custom attributes. </block></para></summary>\r
31                 ForwardRef = 16,\r
32 \r
33                 /// <summary><para>Specifies an internal call.</para><para><block subset="none" type="note">An internal call\r
34                 ///  is a call to a method implemented within the system itself, providing\r
35                 ///  additional functionality that regular managed code cannot provide. <see cref="!:System.Object.MemberWiseClone" />\r
36                 ///  is an example of an internally called method.</block></para></summary>\r
37                 InternalCall = 4096,\r
38 \r
39                 /// <summary><para>Specifies the method can be executed by only one thread at a time.</para><para>This option specifies that before a thread can execute the target method, the\r
40                 ///       thread is required to acquire a lock on either the current\r
41                 ///       instance or the <see cref="T:System.Type" />\r
42                 ///       object for the method's class. If the target method is an instance method, the\r
43                 ///       lock is on the current instance. If the target is a static method, the lock is\r
44                 ///       on the <see cref="T:System.Type" /> object. Specifying this option causes the target method to behave as though its\r
45                 ///       statements are enclosed by <see cref="M:System.Threading.Monitor.Enter(System.Object)" /> and <see cref="M:System.Threading.Monitor.Exit(System.Object)" />\r
46                 ///       statements locking the previous described object. This option and the <see cref="T:System.Threading.Monitor" /> methods are functionally equivalent, and both\r
47                 ///       are functionally equivalent to enclosing the target method's code in a C# lock\r
48                 ///       (this)\r
49                 ///       statement. </para><block subset="none" type="note"><para>Because this option holds the lock for\r
50                 ///          the duration of the target method, it should be used only when the entire method\r
51                 ///          must be single threaded. Use the <see cref="T:System.Threading.Monitor" /> methods (or the C#\r
52                 ///          lock statement) if the object lock can be taken after the method begins, or\r
53                 ///          released before the method ends. Any mechanism that uses locks can cause an\r
54                 ///          application to experience deadlocks and performance degradation; for these\r
55                 ///          reasons, use this option with care.</para><para> For most languages, it is recommended that the notion of\r
56                 ///          "synchronized" be attached to methods using language syntax instead of custom\r
57                 ///          attributes.</para></block></summary>\r
58                 Synchronized = 32,\r
59 \r
60                 /// <summary><para>Specifies that the method is not permitted to be inlined.</para></summary>\r
61                 NoInlining = 8,\r
62         } // MethodImplOptions\r
63 \r
64 } // System.Runtime.CompilerServices\r