Exemplo n.º 1
0
        public override Task DestroyAsync()
        {
            Task Result = base.DestroyAsync();

            if (this.Parent is UsbConnectedDevice UsbConnectedDevice)
            {
                UsbState State = Module.GetState(UsbConnectedDevice.PortName);
                State?.RemovePin(this.PinNrStr, this);
            }

            return(Result);
        }
Exemplo n.º 2
0
        public override async Task <bool> RemoveAsync(INode Child)
        {
            bool Result = await base.RemoveAsync(Child);

            UsbState State = Module.GetState(this.portName);

            if (State != null && Child is Pin Pin)
            {
                State.RemovePin(Pin.PinNrStr, Pin);
            }

            return(Result);
        }