Update mcs/class/System.Core/System/TimeZoneInfo.cs
[mono.git] / mcs / class / IKVM.Reflection / Enums.cs
1 /*
2   Copyright (C) 2009-2012 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         public enum AssemblyContentType
39         {
40                 Default = 0,
41                 WindowsRuntime = 1,
42         }
43
44         [Flags]
45         public enum BindingFlags
46         {
47                 Default = 0,
48                 IgnoreCase = 1,
49                 DeclaredOnly = 2,
50                 Instance = 4,
51                 Static = 8,
52                 Public = 16,
53                 NonPublic = 32,
54                 FlattenHierarchy = 64,
55         }
56
57         [Flags]
58         public enum CallingConventions
59         {
60                 Standard = 1,
61                 VarArgs = 2,
62                 Any = 3,
63                 HasThis = 32,
64                 ExplicitThis = 64,
65         }
66
67         [Flags]
68         public enum EventAttributes
69         {
70                 None = 0,
71                 SpecialName = 512,
72                 RTSpecialName = 1024,
73                 ReservedMask = 1024,
74         }
75
76         [Flags]
77         public enum FieldAttributes
78         {
79                 PrivateScope = 0,
80                 Private = 1,
81                 FamANDAssem = 2,
82                 Assembly = 3,
83                 Family = 4,
84                 FamORAssem = 5,
85                 Public = 6,
86                 FieldAccessMask = 7,
87                 Static = 16,
88                 InitOnly = 32,
89                 Literal = 64,
90                 NotSerialized = 128,
91                 HasFieldRVA = 256,
92                 SpecialName = 512,
93                 RTSpecialName = 1024,
94                 HasFieldMarshal = 4096,
95                 PinvokeImpl = 8192,
96                 HasDefault = 32768,
97                 ReservedMask = 38144,
98         }
99
100         [Flags]
101         public enum GenericParameterAttributes
102         {
103                 None = 0,
104                 Covariant = 1,
105                 Contravariant = 2,
106                 VarianceMask = 3,
107                 ReferenceTypeConstraint = 4,
108                 NotNullableValueTypeConstraint = 8,
109                 DefaultConstructorConstraint = 16,
110                 SpecialConstraintMask = 28,
111         }
112
113         public enum ImageFileMachine
114         {
115                 I386 = 332,
116                 ARM = 452,
117                 IA64 = 512,
118                 AMD64 = 34404,
119         }
120
121         [FlagsAttribute]
122         public enum MemberTypes
123         {
124                 Constructor = 0x01,
125                 Event = 0x02,
126                 Field = 0x04,
127                 Method = 0x08,
128                 Property = 0x10,
129                 TypeInfo = 0x20,
130                 Custom = 0x40,
131                 NestedType = 0x80,
132                 All = Constructor | Event | Field | Method | Property | TypeInfo | NestedType
133         }
134
135         [Flags]
136         public enum MethodAttributes
137         {
138                 MemberAccessMask                = 0x0007,
139                 PrivateScope                    = 0x0000,
140                 Private                                 = 0x0001,
141                 FamANDAssem                             = 0x0002,
142                 Assembly                                = 0x0003,
143                 Family                                  = 0x0004,
144                 FamORAssem                              = 0x0005,
145                 Public                                  = 0x0006,
146                 Static                                  = 0x0010,
147                 Final                                   = 0x0020,
148                 Virtual                                 = 0x0040,
149                 HideBySig                               = 0x0080,
150                 VtableLayoutMask                = 0x0100,
151                 ReuseSlot                               = 0x0000,
152                 NewSlot                                 = 0x0100,
153                 CheckAccessOnOverride   = 0x0200,
154                 Abstract                                = 0x0400,
155                 SpecialName                             = 0x0800,
156
157                 PinvokeImpl                             = 0x2000,
158                 UnmanagedExport                 = 0x0008,
159
160                 RTSpecialName                   = 0x1000,
161                 HasSecurity                             = 0x4000,
162                 RequireSecObject                = 0x8000,
163
164                 ReservedMask                    = 0xd000,
165         }
166
167         [Flags]
168         public enum MethodImplAttributes
169         {
170                 CodeTypeMask            = 0x0003,
171                 IL                                      = 0x0000,
172                 Native                          = 0x0001,
173                 OPTIL                           = 0x0002,
174                 Runtime                         = 0x0003,
175                 ManagedMask                     = 0x0004,
176                 Unmanaged                       = 0x0004,
177                 Managed                         = 0x0000,
178
179                 ForwardRef                      = 0x0010,
180                 PreserveSig                     = 0x0080,
181                 InternalCall            = 0x1000,
182                 Synchronized            = 0x0020,
183                 NoInlining                      = 0x0008,
184                 NoOptimization          = 0x0040,
185                 AggressiveInlining  = 0x0100,
186
187                 MaxMethodImplVal        = 0xffff,
188         }
189
190         [Flags]
191         public enum ParameterAttributes
192         {
193                 None = 0,
194                 In = 1,
195                 Out = 2,
196                 Lcid = 4,
197                 Retval = 8,
198                 Optional = 16,
199                 HasDefault = 4096,
200                 HasFieldMarshal = 8192,
201                 Reserved3 = 16384,
202                 Reserved4 = 32768,
203                 ReservedMask = 61440,
204         }
205
206         [Flags]
207         public enum PortableExecutableKinds
208         {
209                 NotAPortableExecutableImage = 0,
210                 ILOnly = 1,
211                 Required32Bit = 2,
212                 PE32Plus = 4,
213                 Unmanaged32Bit = 8,
214                 Preferred32Bit = 16,
215         }
216
217         public enum ProcessorArchitecture
218         {
219                 None = 0,
220                 MSIL = 1,
221                 X86 = 2,
222                 IA64 = 3,
223                 Amd64 = 4,
224                 Arm = 5,
225                 // if an item is added here, make sure to update AssemblyName.ProcessorArchitecture and Fusion.ParseAssemblyName as well
226         }
227
228         [Flags]
229         public enum PropertyAttributes
230         {
231                 None = 0,
232                 SpecialName = 512,
233                 RTSpecialName = 1024,
234                 HasDefault = 4096,
235         }
236
237         [Flags]
238         public enum ResourceAttributes
239         {
240                 Public = 1,
241                 Private = 2,
242         }
243
244         [Flags]
245         public enum ResourceLocation
246         {
247                 Embedded = 1,
248                 ContainedInAnotherAssembly = 2,
249                 ContainedInManifestFile = 4,
250         }
251
252         [Flags]
253         public enum TypeAttributes
254         {
255                 AnsiClass = 0,
256                 Class = 0,
257                 AutoLayout = 0,
258                 NotPublic = 0,
259                 Public = 1,
260                 NestedPublic = 2,
261                 NestedPrivate = 3,
262                 NestedFamily = 4,
263                 NestedAssembly = 5,
264                 NestedFamANDAssem = 6,
265                 VisibilityMask = 7,
266                 NestedFamORAssem = 7,
267                 SequentialLayout = 8,
268                 ExplicitLayout = 16,
269                 LayoutMask = 24,
270                 ClassSemanticsMask = 32,
271                 Interface = 32,
272                 Abstract = 128,
273                 Sealed = 256,
274                 SpecialName = 1024,
275                 RTSpecialName = 2048,
276                 Import = 4096,
277                 Serializable = 8192,
278                 WindowsRuntime = 16384,
279                 UnicodeClass = 65536,
280                 AutoClass = 131072,
281                 CustomFormatClass = 196608,
282                 StringFormatMask = 196608,
283                 HasSecurity = 262144,
284                 ReservedMask = 264192,
285                 BeforeFieldInit = 1048576,
286                 CustomFormatMask = 12582912,
287         }
288
289         // IKVM.Reflection specific type
290         [Flags]
291         public enum DllCharacteristics
292         {
293                 HighEntropyVA = 0x0020,                 // IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA
294                 DynamicBase = 0x0040,                   // IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE
295                 NoSEH = 0x0400,                                 // IMAGE_DLLCHARACTERISTICS_NO_SEH
296                 NXCompat = 0x0100,                              // IMAGE_DLLCHARACTERISTICS_NX_COMPAT
297                 AppContainer = 0x1000,                  // IMAGE_DLLCHARACTERISTICS_APPCONTAINER
298                 TerminalServerAware = 0x8000,   // IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE
299         }
300
301         // IKVM.Reflection specific type
302         [Flags]
303         public enum ImplMapFlags
304         {
305                 NoMangle = 0x0001,
306                 CharSetMask = 0x0006,
307                 CharSetNotSpec = 0x0000,
308                 CharSetAnsi = 0x0002,
309                 CharSetUnicode = 0x0004,
310                 CharSetAuto = 0x0006,
311                 SupportsLastError = 0x0040,
312                 CallConvMask = 0x0700,
313                 CallConvWinapi = 0x0100,
314                 CallConvCdecl = 0x0200,
315                 CallConvStdcall = 0x0300,
316                 CallConvThiscall = 0x0400,
317                 CallConvFastcall = 0x0500,
318                 // non-standard flags (i.e. CLR specific)
319                 BestFitOn = 0x0010,
320                 BestFitOff = 0x0020,
321                 CharMapErrorOn = 0x1000,
322                 CharMapErrorOff = 0x2000,
323         }
324 }