| 1 |
// |
| 2 |
// TypeAttributes.cs |
| 3 |
// |
| 4 |
// Author: |
| 5 |
// Jb Evain ([email protected]) |
| 6 |
// |
| 7 |
// (C) 2005 Jb Evain |
| 8 |
// |
| 9 |
// Permission is hereby granted, free of charge, to any person obtaining |
| 10 |
// a copy of this software and associated documentation files (the |
| 11 |
// "Software"), to deal in the Software without restriction, including |
| 12 |
// without limitation the rights to use, copy, modify, merge, publish, |
| 13 |
// distribute, sublicense, and/or sell copies of the Software, and to |
| 14 |
// permit persons to whom the Software is furnished to do so, subject to |
| 15 |
// the following conditions: |
| 16 |
// |
| 17 |
// The above copyright notice and this permission notice shall be |
| 18 |
// included in all copies or substantial portions of the Software. |
| 19 |
// |
| 20 |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 21 |
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 22 |
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 23 |
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| 24 |
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| 25 |
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 26 |
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 27 |
// |
| 28 |
|
| 29 |
namespace Mono.Cecil { |
| 30 |
|
| 31 |
using System; |
| 32 |
|
| 33 |
[Flags] |
| 34 |
internal enum TypeAttributes : uint { |
| 35 |
// Visibility attributes |
| 36 |
VisibilityMask = 0x00000007, // Use this mask to retrieve visibility information |
| 37 |
NotPublic = 0x00000000, // Class has no public scope |
| 38 |
Public = 0x00000001, // Class has public scope |
| 39 |
NestedPublic = 0x00000002, // Class is nested with public visibility |
| 40 |
NestedPrivate = 0x00000003, // Class is nested with private visibility |
| 41 |
NestedFamily = 0x00000004, // Class is nested with family visibility |
| 42 |
NestedAssembly = 0x00000005, // Class is nested with assembly visibility |
| 43 |
NestedFamANDAssem = 0x00000006, // Class is nested with family and assembly visibility |
| 44 |
NestedFamORAssem = 0x00000007, // Class is nested with family or assembly visibility |
| 45 |
|
| 46 |
// Class layout attributes |
| 47 |
LayoutMask = 0x00000018, // Use this mask to retrieve class layout information |
| 48 |
AutoLayout = 0x00000000, // Class fields are auto-laid out |
| 49 |
SequentialLayout = 0x00000008, // Class fields are laid out sequentially |
| 50 |
ExplicitLayout = 0x00000010, // Layout is supplied explicitly |
| 51 |
|
| 52 |
// Class semantics attributes |
| 53 |
ClassSemanticMask = 0x00000020, // Use this mask to retrieve class semantics information |
| 54 |
Class = 0x00000000, // Type is a class |
| 55 |
Interface = 0x00000020, // Type is an interface |
| 56 |
|
| 57 |
// Special semantics in addition to class semantics |
| 58 |
Abstract = 0x00000080, // Class is abstract |
| 59 |
Sealed = 0x00000100, // Class cannot be extended |
| 60 |
SpecialName = 0x00000400, // Class name is special |
| 61 |
|
| 62 |
// Implementation attributes |
| 63 |
Import = 0x00001000, // Class/Interface is imported |
| 64 |
Serializable = 0x00002000, // Class is serializable |
| 65 |
|
| 66 |
// String formatting attributes |
| 67 |
StringFormatMask = 0x00030000, // Use this mask to retrieve string information for native interop |
| 68 |
AnsiClass = 0x00000000, // LPSTR is interpreted as ANSI |
| 69 |
UnicodeClass = 0x00010000, // LPSTR is interpreted as Unicode |
| 70 |
AutoClass = 0x00020000, // LPSTR is interpreted automatically |
| 71 |
|
| 72 |
// Class initialization attributes |
| 73 |
BeforeFieldInit = 0x00100000, // Initialize the class before first static field access |
| 74 |
|
| 75 |
// Additional flags |
| 76 |
RTSpecialName = 0x00000800, // CLI provides 'special' behavior, depending upon the name of the Type |
| 77 |
HasSecurity = 0x00040000, // Type has security associate with it |
| 78 |
Forwarder = 0x00200000, // Exported type is a type forwarder |
| 79 |
} |
| 80 |
} |