public void Disconnect() { Log.Info(_device.Hostname, $"Disconnecting {Name} from {_connectedTo.Name} on {ConnectedToHostname}"); _onDisconnectAction(_connectedTo); _connectedTo._onDisconnectAction(this); _connectedTo._connectedTo = null; _connectedTo = null; }
public void ConnectTo(EthernetPort ethernetPort) { Log.Info(_device.Hostname, $"Connecting {Name} to {ethernetPort.Name} on {ethernetPort._device.Hostname}"); _connectedTo = ethernetPort; ethernetPort._connectedTo = this; _onConnectAction(ethernetPort); ethernetPort._onConnectAction(this); }