public void Shutdown() { if (_manager != null) { _manager.Connected -= OnActorConnected; _manager.Disconnected -= OnActorDisconnected; _manager.DataReceived -= OnActorDataReceived; _manager.CloseAllChannels(); _manager = null; } if (_directory != null) { _directory.Close(); _directory = null; } }
public void Shutdown() { if (_manager != null) { _manager.CloseAllChannels(); _manager.ChannelConnected -= OnActorChannelConnected; _manager.ChannelDisconnected -= OnActorChannelDisconnected; _manager.ChannelDataReceived -= OnActorChannelDataReceived; _manager = null; } if (_directory != null) { _directory.Deregister(this.Identity); _directory.Close(); _directory = null; } }