Exemplo n.º 1
0
 internal static ConnectionListener Get(Assembly startAssembly, DbConnection dbConnection, EndPoint listenerEndPoint, EndPoint[] forwardEndPoints) => Listeners.GetOrAdd(listenerEndPoint, (e) =>
 {
     var connectionListener = new ConnectionListener();
     connectionListener.Listen(startAssembly, dbConnection, listenerEndPoint, forwardEndPoints);
     Events.RaiseListenerCreated(connectionListener);
     return(connectionListener);
 });
Exemplo n.º 2
0
 internal static void Remove(ConnectionListener listener)
 {
     Events.RaiseListenerDisposed(listener);
     Listeners.TryRemove(listener.EndPoint, out var c);
 }