protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { _sent.Dispose(); _received.Dispose(); _endpointCache.Clear(); if (EndpointCache != null) { EndpointCache.Dispose(); EndpointCache = null; } ServiceBusFactory.ConfigureDefaultSettings(x => x.SetEndpointCache(null)); } _disposed = true; }
public void Dispose() { _endpoint.Dispose(); _received.Dispose(); _sent.Dispose(); }