Ejemplo n.º 1
0
 public Turnstile(DurableConnection <Req, Resp> connection)
 {
     Condition.Requires(connection, "connection").IsNotNull();
     _connection = connection;
     _connection.OnDisconnected += OnDisconnected;
     _queue = new RequestQueue(connection.Scheduler);
 }
Ejemplo n.º 2
0
 // Does not take ownership of `scheduler`: DurableConnection.Dispose() won't call Scheduler.Dispose().
 public DurableConnection(IConnector <In, Out> connector, Scheduler scheduler)
 {
     Condition.Requires(connector, "connector").IsNotNull();
     Condition.Requires(scheduler, "scheduler").IsNotNull();
     _connector    = connector;
     _scheduler    = scheduler;
     _requestQueue = new RequestQueue(scheduler);
 }