uint GetUInt(org.freedesktop.DBus.Properties dbusobj, string path, string propname) { try { return(UInt32.Parse(dbusobj.Get(path, propname).ToString())); } catch { return(0); } }
double GetDouble(org.freedesktop.DBus.Properties dbusobj, string path, string propname) { try { return(Double.Parse(dbusobj.Get(path, propname).ToString())); } catch { return(0); } }
private DkDisk (string obj_path) { if (udisks_finder != null) { udisks_disk = Bus.System.GetObject<UDisksDisk> (udisks_bus_name, new ObjectPath (obj_path)); props = Bus.System.GetObject<org.freedesktop.DBus.Properties> (udisks_bus_name, new ObjectPath (obj_path)); } else { dk_disk = Bus.System.GetObject<IDkDisk> (dk_bus_name, new ObjectPath(obj_path)); props = Bus.System.GetObject<org.freedesktop.DBus.Properties> (dk_bus_name, new ObjectPath(obj_path)); } }
public UDiskDevice(string deviceName) { DeviceName = deviceName; _device = Bus.System.GetObject <IUDiskDevice>("org.freedesktop.UDisks", new ObjectPath(deviceName)); _properties = Bus.System.GetObject <DBusProperties>("org.freedesktop.UDisks", new ObjectPath(deviceName)); }
public UDiskDevice(string deviceName) { DeviceName = deviceName; _device = Bus.System.GetObject<IUDiskDevice>("org.freedesktop.UDisks", new ObjectPath(deviceName)); _properties = Bus.System.GetObject<DBusProperties>("org.freedesktop.UDisks", new ObjectPath(deviceName)); }