//
using System;
-
+using Mono.Cecil.Metadata;
using Mono.Collections.Generic;
namespace Mono.Cecil {
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); }
}
}
+ public override bool IsPrimitive {
+ get {
+ ElementType primitive_etype;
+ return MetadataSystem.TryGetPrimitiveElementType (this, out primitive_etype);
+ }
+ }
+
+ public override MetadataType MetadataType {
+ get {
+ ElementType primitive_etype;
+ if (MetadataSystem.TryGetPrimitiveElementType (this, out primitive_etype))
+ return (MetadataType) primitive_etype;
+
+ return base.MetadataType;
+ }
+ }
+
public override bool IsDefinition {
get { return true; }
}