public void OnEvent(FileSystemEvent e) { var path = e.Path; switch (e.ChangeType) { case ChangeType.Created: _createEventHandler.Handle(path); break; case ChangeType.Changed: _changeEventHandler.Handle(path); break; case ChangeType.Deleted: _deleteEventHandler.Handle(path); break; case ChangeType.Rename: _renameEventHandler.Handle(e.OldPath, path); break; case ChangeType.Log: break; default: throw new ArgumentOutOfRangeException(); } }