public void Dispose() { _scheduler.Unsubscribe(_queue); _scheduler.Dispose(); IEnumerable <Endpoint> endpoints; lock (_lock) { endpoints = _endpoints.ToArray(); } foreach (var endpoint in endpoints) { endpoint.Dispose(); } }
public void Dispose() { _scheduler.Unsubscribe(_queue); }