public void GivenMessage_WhenDispose_ShouldNotifyObservers() { var observerMock = new Mock <IObserver <IPublisherMessageBatching> >(); observerMock.Setup(x => x.OnCompleted()) .Verifiable(); var unsubscribe = _publisher.Subscribe(observerMock.Object); _publisher.Dispose(); unsubscribe.Should().NotBeNull(); observerMock.VerifyAll(); }
private void DisposePublisher() { lock (_publisher) { _publisher.Dispose(); } }
public DisposeResponse Dispose(DisposeRequest request) { _publisher.Dispose(request); return(new DisposeResponse() { Success = true }); }
protected override void Dispose(bool disposing) { if (disposing) { _publisher.Dispose(); _subscriber.Dispose(); _bus.Dispose(); } base.Dispose(disposing); }
public void Dispose() { foreach (ILayoutWorker lw in _layoutWorkers) { lw.Dispose(); } foreach (IReleaseVerifier rv in _verifiers) { rv.Dispose(); } _publisher.Dispose(); _manifestGenerator.Dispose(); }
public override void Dispose() { logger.Debug("Disposing of requester"); if (publisher != null) { logger.Debug(" -> Disposing of publisher"); publisher.Dispose(); } if (subscription != null) { logger.Debug(" -> Disposing of subscription"); subscription.Dispose(); } base.Dispose(); }
public void Dispose() { _publisher?.Dispose(); }
public void Dispose() { _publisher.Dispose(); Console.WriteLine(new string('-', 20)); Console.WriteLine("Disposing the Service"); }
public void Stop() { publisher.Dispose(); subscriber.Dispose(); bus.Dispose(); }