Example #1
0
        public static void PendriveFromFile(this Machine machine, string file, string name, IPeripheralRegister <IUSBDevice, NumberRegistrationPoint <int> > attachTo, int port, bool persistent = true)
        {
            var pendrive = new USBPendrive(file, persistent: persistent);

            attachTo.Register(pendrive, new NumberRegistrationPoint <int>(port));
            machine.SetLocalName(pendrive, name);
        }
        public static void PendriveFromFile(this USBIPServer usbController, string file, bool persistent = true, int?port = null)
        {
            var pendrive = new USBPendrive(file, persistent: persistent);

            usbController.Register(pendrive, port);
        }