private void ProcessSupervisorStateChanged(object sender, ConversationContextChannelStateChangedEventArgs args) { if (args.State == ConversationContextChannelState.Terminating) { this.BeginShutDown(sd => { this.EndShutDown(sd); }, null); } }
/// <summary> /// State changed event handler for the channel. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ChannelStateChanged(object sender, ConversationContextChannelStateChangedEventArgs e) { ConversationContextChannel convChannel = sender as ConversationContextChannel; if (e.State == ConversationContextChannelState.Terminated) { this.UnregisterContextChannelHandlers(convChannel); } }