protected override void ProcessRecord()
        {
            string selector;

            switch (DeviceType.ToLower())
            {
                case "inputport":
                    selector = MidiInPort.GetDeviceSelector();
                    break;

                case "outputport":
                    selector = MidiOutPort.GetDeviceSelector();
                    break;
            }

            var deviceWatcher = DeviceInformation.CreateWatcher(MidiInPort.GetDeviceSelector());

            var midiDeviceWatcher = new MidiDeviceWatcher(deviceWatcher);

            WriteObject(midiDeviceWatcher);
        }
Example #2
0
        protected override void ProcessRecord()
        {
            string selector;

            switch (DeviceType.ToLower())
            {
            case "inputport":
                selector = MidiInPort.GetDeviceSelector();
                break;

            case "outputport":
                selector = MidiOutPort.GetDeviceSelector();
                break;
            }

            var deviceWatcher = DeviceInformation.CreateWatcher(MidiInPort.GetDeviceSelector());

            var midiDeviceWatcher = new MidiDeviceWatcher(deviceWatcher);

            WriteObject(midiDeviceWatcher);
        }