internal QueueProcessor(SimpleInMemConnection connection, ServiceHost serviceHost, SimpleInMemTransport transport, Logger logger) { if (connection == null) throw new ArgumentNullException(nameof(connection)); if (serviceHost == null) throw new ArgumentNullException(nameof(serviceHost)); if (transport == null) throw new ArgumentNullException(nameof(transport)); this.connection = connection; this.serviceHost = serviceHost; this.transport = transport; this.logger = logger; }
public async Task DefaultSetup(IService service, int count) { transport = transportBuilder.Construct(); listener = (SimpleInMemListener)transport.MakeListener(address); listener.AddService(service); await listener.StartAsync(); connections = new SimpleInMemConnection[count]; for (int connectionIndex = 0; connectionIndex < count; connectionIndex++) { connections[connectionIndex] = (SimpleInMemConnection)await transport.ConnectToAsync(address, System.Threading.CancellationToken.None); Assert.IsTrue(connections[connectionIndex].IsConnected); Assert.IsTrue(connections[connectionIndex].IsPaired); } }
internal QueueProcessor(SimpleInMemConnection connection, ServiceHost serviceHost, SimpleInMemTransport transport, Logger logger) { if (connection == null) { throw new ArgumentNullException(nameof(connection)); } if (serviceHost == null) { throw new ArgumentNullException(nameof(serviceHost)); } if (transport == null) { throw new ArgumentNullException(nameof(transport)); } this.connection = connection; this.serviceHost = serviceHost; this.transport = transport; this.logger = logger; }
internal BatchProcessor(SimpleInMemConnection connection, ServiceHost serviceHost, SimpleInMemTransport transport, Logger logger) : base(connection, serviceHost, transport, logger) { }
public void Cleanup() { transport.StopAsync(); transport = null; }
public void Init() { transport = new SimpleInMemTransportBuilder().Construct(); }
public void Init() { transport = new SimpleInMemTransportBuilder().Construct(); service = new CalculatorService(); }