Ejemplo n.º 1
0
 bool GetBoolean(org.freedesktop.DBus.Properties dbusobj, string path, string propname)
 {
     try {
         return(Boolean.Parse(dbusobj.Get(path, propname).ToString()));
     } catch (Exception) {
         return(false);
     }
 }
Ejemplo n.º 2
0
 bool GetBoolean(org.freedesktop.DBus.Properties dbusobj, string path, string propname)
 {
     try {
         return(Boolean.Parse(dbusobj.Get(path, propname).ToString()));
     } catch (Exception e) {
         Log.Error("{0}", e.Message);
         Log.Debug(e.StackTrace);
         return(false);
     }
 }
Ejemplo n.º 3
0
 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));
 }
Ejemplo n.º 4
0
 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));
 }