private void OnTcpEndPointListening(object sender, TcpEndPointListeningEventArgs e) { try { _productCache.AddTail(e); } catch (System.Exception) { } }
void INodeListenerObserver.OnEndPointListening(TcpListener listener) { try { var args = new TcpEndPointListeningEventArgs(_rsspConfig.LocalID, listener.LocalEndpoint as IPEndPoint); this.NotifyTcpEndPointListeningEvent(args); } catch (System.Exception) { } }
protected void NotifyTcpEndPointListeningEvent(TcpEndPointListeningEventArgs args) { try { if (this.TcpEndPointListening != null) { this.TcpEndPointListening(null, args); } } catch (System.Exception) { } }
private void ShowTcpEndPointListeningEvent(TcpEndPointListeningEventArgs args) { try { this.Invoke(new Action(() => { this.UpdateListeningPoint(args.LocalID, args.EndPoint, true); })); } catch (System.Exception ex) { this.ShowLog(ex.Message); } }