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