コード例 #1
0
        public void SetTargetPort(PortModel port)
        {
            if (TargetPort == port)
            {
                return;
            }

            TargetPort?.RemoveLink(this);
            TargetPort = port;
            TargetPort.AddLink(this);
            TargetPortChanged?.Invoke();
        }
コード例 #2
0
        public void SetTargetPort(PortModel?port)
        {
            if (TargetPort == port)
            {
                return;
            }

            var old = TargetPort;

            TargetPort?.RemoveLink(this);
            TargetPort = port;
            TargetPort?.AddLink(this);
            TargetPortChanged?.Invoke(this, old, TargetPort);
        }