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); }
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); }