public void StartStopBusAttachment() { var bus = new BusAttachment("ServiceTest", true); Assert.IsFalse(bus.IsStarted); Assert.IsFalse(bus.IsConnected); bus.Start(); Assert.IsTrue(bus.IsStarted); Assert.IsFalse(bus.IsConnected); bus.Connect(); Assert.IsTrue(bus.IsConnected); Assert.IsFalse(bus.IsStopping); Assert.IsFalse(string.IsNullOrEmpty(bus.UniqueName)); bus.Stop(); Assert.IsTrue(bus.IsStopping); Assert.IsTrue(bus.IsStarted); bus.Join(); Assert.IsFalse(bus.IsStarted); Assert.IsFalse(bus.IsConnected); bus.Dispose(); }
private void StopService() { //TODO serviceBus.Stop(); serviceBus.Join(); serviceBus.Dispose(); }
private void StopClient() { clientBus.AboutAnnounced -= Result_AboutAnnounced; Log.WriteLine("AboutListener disposed"); clientBus.Stop(); Log.WriteLine("BusAttachment stopped"); clientBus.Join(); Log.WriteLine("Join complete"); clientBus.Dispose(); Log.WriteLine("BusAttachment disposed"); }
public void Stop() { bus.Stop(); bus.Join(); bus.Dispose(); }