dbus/mono/DBusType Byte.cs,1.2,1.3
Owen Fraser-Green
ow3n at pdx.freedesktop.org
Wed Mar 24 09:02:10 PST 2004
- Previous message: dbus/mono ProxyBuilder.cs,1.3,1.4
- Next message: dbus/mono/DBusType Byte.cs, 1.3, 1.4 Int32.cs, 1.2, 1.3 Int64.cs,
1.2, 1.3 UInt32.cs, 1.2, 1.3 UInt64.cs, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/dbus/dbus/mono/DBusType
In directory pdx:/tmp/cvs-serv20474/DBusType
Modified Files:
Byte.cs
Log Message:
Modified to support char type.
Index: Byte.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/DBusType/Byte.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- a/Byte.cs 24 Mar 2004 13:15:20 -0000 1.2
+++ b/Byte.cs 24 Mar 2004 17:02:08 -0000 1.3
@@ -23,6 +23,11 @@
this.val = val;
}
+ public Byte(System.Char val, Service service)
+ {
+ this.val = (byte) val;
+ }
+
public Byte(IntPtr iter, Service service)
{
this.val = dbus_message_iter_get_byte(iter);
@@ -39,6 +44,8 @@
switch (type.ToString()) {
case "System.Byte":
case "System.Byte&":
+ case "System.Char":
+ case "System.Char&":
return true;
}
@@ -72,6 +79,10 @@
case "System.Byte":
case "System.Byte&":
return this.val;
+ case "System.Char":
+ case "System.Char&":
+ char charVal = (char) this.val;
+ return charVal;
default:
throw new ArgumentException("Cannot cast DBus.Type.Byte to type '" + type.ToString() + "'");
}
- Previous message: dbus/mono ProxyBuilder.cs,1.3,1.4
- Next message: dbus/mono/DBusType Byte.cs, 1.3, 1.4 Int32.cs, 1.2, 1.3 Int64.cs,
1.2, 1.3 UInt32.cs, 1.2, 1.3 UInt64.cs, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dbus-commit
mailing list