diff options
Diffstat (limited to 'mono/DBusType/UInt32.cs')
-rw-r--r-- | mono/DBusType/UInt32.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mono/DBusType/UInt32.cs b/mono/DBusType/UInt32.cs index 43753511..e97aa37d 100644 --- a/mono/DBusType/UInt32.cs +++ b/mono/DBusType/UInt32.cs @@ -36,6 +36,10 @@ namespace DBus.DBusType public static bool Suits(System.Type type) { + if (type.IsEnum && type.UnderlyingSystemType == typeof(System.UInt32)) { + return true; + } + switch (type.ToString()) { case "System.UInt32": case "System.UInt32&": @@ -68,6 +72,10 @@ namespace DBus.DBusType public object Get(System.Type type) { + if (type.IsEnum) { + return Enum.ToObject(type, this.val); + } + switch (type.ToString()) { case "System.UInt32": |