public virtual bool Close() { var e = new PortEventArgs(Address); OnPortClosing(e); if (!e.Cancel) { Session.Dispose(); return(true); } return(false); }
public virtual bool Open() { var e = new PortEventArgs(Address); OnPortOpenning(e); if (!e.Cancel) { Session.TimeoutMilliseconds = Timeout; return(true); } return(false); }
protected virtual void OnPortClosing(PortEventArgs e) { PortClosing?.Invoke(this, e); }