public DirectoryMonitor(string directory) { _baseDirectory = directory; _coordinatorChannel = AddressRegistry.GetOutboundCoordinatorChannel(); _fiber = new ThreadPoolFiber(); }
void Dispose(bool disposing) { if (_disposed) return; if (disposing) { if (_scheduler != null) _scheduler.Stop(); _fiber.Shutdown(30.Seconds()); if (_producer != null) _producer.Dispose(); if (_coordinatorChannel != null) { _coordinatorChannel.Dispose(); _coordinatorChannel = null; } } _disposed = true; }