private string[] SafelyGetStringList(string name)
 {
     try {
         if (device.PropertyExists(name))
         {
             return(device.GetPropertyStringList(name));
         }
     } catch {}
     return(new string [0]);
 }
示例#2
0
        protected Volume(BlockDevice parent, Hal.Manager manager, Hal.Device device) : base(manager, device)
        {
            this.parent = parent ?? BlockDevice.Resolve <IBlockDevice> (manager, device.Parent);

            method_names = HalDevice.PropertyExists(method_names_property)
                ? device.GetPropertyStringList(method_names_property)
                : new string[0];
        }
示例#3
0
 public string [] GetPropertyStringList(string key)
 {
     return(device.GetPropertyStringList(key));
 }