public void AddInPort(LinkLineNodeInPort port) { if (port == null) { throw new DesignerException("Cannot add null to inports for {1}", this.GetType().Name); } EventPortIn epi = port as EventPortIn; if (epi == null) { throw new DesignerException("Cannot add {0} to inports for {1}", port.GetType().Name, this.GetType().Name); } if (_inPortList == null) { _inPortList = new List <EventPortIn>(); } _inPortList.Add(epi); }