Permalink
Browse files

Add enum value and properties for Windows Runtime.

This corresponds to the 'windowsruntime' IL keyword.
  • Loading branch information...
1 parent 1d446c7 commit a2c944bd45b81443fd61cfd27d98ff551fa6938c @dgrunwald dgrunwald committed Feb 29, 2012
View
1 Mono.Cecil/AssemblyFlags.cs
@@ -35,6 +35,7 @@ public enum AssemblyAttributes : uint {
PublicKey = 0x0001,
SideBySideCompatible = 0x0000,
Retargetable = 0x0100,
+ WindowsRuntime = 0x0200,
DisableJITCompileOptimizer = 0x4000,
EnableJITCompileTracking = 0x8000,
}
View
5 Mono.Cecil/AssemblyNameReference.cs
@@ -92,6 +92,11 @@ public class AssemblyNameReference : IMetadataScope {
set { attributes = attributes.SetAttributes ((uint) AssemblyAttributes.Retargetable, value); }
}
+ public bool IsWindowsRuntime {
+ get { return attributes.GetAttributes ((uint) AssemblyAttributes.WindowsRuntime); }
+ set { attributes = attributes.SetAttributes ((uint) AssemblyAttributes.WindowsRuntime, value); }
+ }
+
public byte [] PublicKey {
get { return public_key; }
set {
View
1 Mono.Cecil/TypeAttributes.cs
@@ -62,6 +62,7 @@ public enum TypeAttributes : uint {
// Implementation attributes
Import = 0x00001000, // Class/Interface is imported
Serializable = 0x00002000, // Class is serializable
+ WindowsRuntime = 0x00004000, // Windows Runtime type
// String formatting attributes
StringFormatMask = 0x00030000, // Use this mask to retrieve string information for native interop
View
5 Mono.Cecil/TypeDefinition.cs
@@ -389,6 +389,11 @@ void ResolveLayout ()
set { attributes = attributes.SetAttributes ((uint) TypeAttributes.Serializable, value); }
}
+ public bool IsWindowsRuntime {
+ get { return attributes.GetAttributes ((uint) TypeAttributes.WindowsRuntime); }
+ set { attributes = attributes.SetAttributes ((uint) TypeAttributes.WindowsRuntime, value); }
+ }
+
public bool IsAnsiClass {
get { return attributes.GetMaskedAttributes ((uint) TypeAttributes.StringFormatMask, (uint) TypeAttributes.AnsiClass); }
set { attributes = attributes.SetMaskedAttributes ((uint) TypeAttributes.StringFormatMask, (uint) TypeAttributes.AnsiClass, value); }

0 comments on commit a2c944b

Please sign in to comment.