protected override void OnStop() { if (_service == null) { return; } _service.Stop(DeliveryCancellationHandling.SendToBacklog); _service.Dispose(); _service = null; }