CHDKPTP.CHDKPTPUtil.FindDevices C# (CSharp) Method

FindDevices() public static method

public static FindDevices ( bool only_supported = true, CHDKPTPDevice>.Func constr = null ) : List
only_supported bool
constr CHDKPTPDevice>.Func
return List
        public static List<CHDKPTPDevice> FindDevices(bool only_supported = true, Func<UsbDevice,CHDKPTPDevice> constr = null)
        {
            if (constr == null)
                constr = x => new CHDKPTPDevice(x);

            List<CHDKPTPDevice> r = PTPUtil.FindDevices(only_supported, constr).ConvertAll<CHDKPTPDevice>(CheckSupported);

            if (only_supported)
                r = r.Where(x => x.CHDKSupported).ToList();

            return r;
        }