Update to the latest IKVM reflection
[mono.git] / mcs / class / IKVM.Reflection / Enums.cs
1 /*
2   Copyright (C) 2009 Jeroen Frijters
3
4   This software is provided 'as-is', without any express or implied
5   warranty.  In no event will the authors be held liable for any damages
6   arising from the use of this software.
7
8   Permission is granted to anyone to use this software for any purpose,
9   including commercial applications, and to alter it and redistribute it
10   freely, subject to the following restrictions:
11
12   1. The origin of this software must not be misrepresented; you must not
13      claim that you wrote the original software. If you use this software
14      in a product, an acknowledgment in the product documentation would be
15      appreciated but is not required.
16   2. Altered source versions must be plainly marked as such, and must not be
17      misrepresented as being the original software.
18   3. This notice may not be removed or altered from any source distribution.
19
20   Jeroen Frijters
21   jeroen@frijters.net
22   
23 */
24 using System;
25
26 namespace IKVM.Reflection
27 {
28         [Flags]
29         public enum AssemblyNameFlags
30         {
31                 None = 0,
32                 PublicKey = 1,
33                 Retargetable = 256,
34                 EnableJITcompileOptimizer = 16384,
35                 EnableJITcompileTracking = 32768,
36         }
37
38         [Flags]
39         public enum BindingFlags
40         {
41                 Default = 0,
42                 DeclaredOnly = 2,
43                 Instance = 4,
44                 Static = 8,
45                 Public = 16,
46                 NonPublic = 32,
47                 FlattenHierarchy = 64,
48         }
49
50         [Flags]
51         public enum CallingConventions
52         {
53                 Standard = 1,
54                 VarArgs = 2,
55                 Any = 3,
56                 HasThis = 32,
57                 ExplicitThis = 64,
58         }
59
60         [Flags]
61         public enum EventAttributes
62         {
63                 None = 0,
64                 SpecialName = 512,
65                 RTSpecialName = 1024,
66                 ReservedMask = 1024,
67         }
68
69         [Flags]
70         public enum FieldAttributes
71         {
72                 PrivateScope = 0,
73                 Private = 1,
74                 FamANDAssem = 2,
75                 Assembly = 3,
76                 Family = 4,
77                 FamORAssem = 5,
78                 Public = 6,
79                 FieldAccessMask = 7,
80                 Static = 16,
81                 InitOnly = 32,
82                 Literal = 64,
83                 NotSerialized = 128,
84                 HasFieldRVA = 256,
85                 SpecialName = 512,
86                 RTSpecialName = 1024,
87                 HasFieldMarshal = 4096,
88                 PinvokeImpl = 8192,
89                 HasDefault = 32768,
90                 ReservedMask = 38144,
91         }
92
93         [Flags]
94         public enum GenericParameterAttributes
95         {
96                 None = 0,
97                 Covariant = 1,
98                 Contravariant = 2,
99                 VarianceMask = 3,
100                 ReferenceTypeConstraint = 4,
101                 NotNullableValueTypeConstraint = 8,
102                 DefaultConstructorConstraint = 16,
103                 SpecialConstraintMask = 28,
104         }
105
106         public enum ImageFileMachine
107         {
108                 I386 = 332,
109                 IA64 = 512,
110                 AMD64 = 34404,
111         }
112
113         [FlagsAttribute]
114         public enum MemberTypes
115         {
116                 Constructor = 0x01,
117                 Event = 0x02,
118                 Field = 0x04,
119                 Method = 0x08,
120                 Property = 0x10,
121                 TypeInfo = 0x20,
122                 Custom = 0x40,
123                 NestedType = 0x80,
124                 All = Constructor | Event | Field | Method | Property | TypeInfo | NestedType
125         }
126
127         [Flags]
128         public enum MethodAttributes
129         {
130                 MemberAccessMask                = 0x0007,
131                 PrivateScope                    = 0x0000,
132                 Private                                 = 0x0001,
133                 FamANDAssem                             = 0x0002,
134                 Assembly                                = 0x0003,
135                 Family                                  = 0x0004,
136                 FamORAssem                              = 0x0005,
137                 Public                                  = 0x0006,
138                 Static                                  = 0x0010,
139                 Final                                   = 0x0020,
140                 Virtual                                 = 0x0040,
141                 HideBySig                               = 0x0080,
142                 VtableLayoutMask                = 0x0100,
143                 ReuseSlot                               = 0x0000,
144                 NewSlot                                 = 0x0100,
145                 CheckAccessOnOverride   = 0x0200,
146                 Abstract                                = 0x0400,
147                 SpecialName                             = 0x0800,
148
149                 PinvokeImpl                             = 0x2000,
150                 UnmanagedExport                 = 0x0008,
151
152                 RTSpecialName                   = 0x1000,
153                 HasSecurity                             = 0x4000,
154                 RequireSecObject                = 0x8000,
155
156                 ReservedMask                    = 0xd000,
157         }
158
159         [Flags]
160         public enum MethodImplAttributes
161         {
162                 CodeTypeMask            = 0x0003,
163                 IL                                      = 0x0000,
164                 Native                          = 0x0001,
165                 OPTIL                           = 0x0002,
166                 Runtime                         = 0x0003,
167                 ManagedMask                     = 0x0004,
168                 Unmanaged                       = 0x0004,
169                 Managed                         = 0x0000,
170
171                 ForwardRef                      = 0x0010,
172                 PreserveSig                     = 0x0080,
173                 InternalCall            = 0x1000,
174                 Synchronized            = 0x0020,
175                 NoInlining                      = 0x0008,
176                 NoOptimization          = 0x0040,
177
178                 MaxMethodImplVal        = 0xffff,
179         }
180
181         [Flags]
182         public enum ParameterAttributes
183         {
184                 None = 0,
185                 In = 1,
186                 Out = 2,
187                 Lcid = 4,
188                 Retval = 8,
189                 Optional = 16,
190                 HasDefault = 4096,
191                 HasFieldMarshal = 8192,
192                 Reserved3 = 16384,
193                 Reserved4 = 32768,
194                 ReservedMask = 61440,
195         }
196
197         [Flags]
198         public enum PortableExecutableKinds
199         {
200                 NotAPortableExecutableImage = 0,
201                 ILOnly = 1,
202                 Required32Bit = 2,
203                 PE32Plus = 4,
204                 Unmanaged32Bit = 8,
205         }
206
207         public enum ProcessorArchitecture
208         {
209                 None = 0,
210                 MSIL = 1,
211                 X86 = 2,
212                 IA64 = 3,
213                 Amd64 = 4,
214         }
215
216         [Flags]
217         public enum PropertyAttributes
218         {
219                 None = 0,
220                 SpecialName = 512,
221                 RTSpecialName = 1024,
222                 HasDefault = 4096,
223         }
224
225         [Flags]
226         public enum ResourceAttributes
227         {
228                 Public = 1,
229                 Private = 2,
230         }
231
232         public enum ResourceLocation
233         {
234                 Embedded = 1,
235                 ContainedInAnotherAssembly = 2,
236                 ContainedInManifestFile = 4,
237         }
238
239         [Flags]
240         public enum TypeAttributes
241         {
242                 AnsiClass = 0,
243                 Class = 0,
244                 AutoLayout = 0,
245                 NotPublic = 0,
246                 Public = 1,
247                 NestedPublic = 2,
248                 NestedPrivate = 3,
249                 NestedFamily = 4,
250                 NestedAssembly = 5,
251                 NestedFamANDAssem = 6,
252                 VisibilityMask = 7,
253                 NestedFamORAssem = 7,
254                 SequentialLayout = 8,
255                 ExplicitLayout = 16,
256                 LayoutMask = 24,
257                 ClassSemanticsMask = 32,
258                 Interface = 32,
259                 Abstract = 128,
260                 Sealed = 256,
261                 SpecialName = 1024,
262                 RTSpecialName = 2048,
263                 Import = 4096,
264                 Serializable = 8192,
265                 UnicodeClass = 65536,
266                 AutoClass = 131072,
267                 CustomFormatClass = 196608,
268                 StringFormatMask = 196608,
269                 HasSecurity = 262144,
270                 ReservedMask = 264192,
271                 BeforeFieldInit = 1048576,
272                 CustomFormatMask = 12582912,
273         }
274 }