bool GetBoolean(org.freedesktop.DBus.Properties dbusobj, string path, string propname) { try { return(Boolean.Parse(dbusobj.Get(path, propname).ToString())); } catch (Exception) { return(false); } }
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); } }
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)); }