Beispiel #1
0
 public static void Raise(this OnChannelDisposed @event, object sender, ChannelEventArgs e)
 {
     if (@event != null)
     {
         @event(sender, e);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Disposes and removes a channel from this server
        /// </summary>
        /// <param name="channel">The channel to remove</param>
        public void DisposeChannel(IServerChannel channel)
        {
            var id = _channelMgr.RemoveChannel(channel);

            OnChannelDisposed.Raise(this, new ChannelEventArgs(id));
        }
Beispiel #3
0
        /// <summary>
        /// Disposes and removes a channel from this server
        /// </summary>
        /// <param name="pred">The predicate used to determine what channel to dispose and remove</param>
        public void DisposeChannel(Predicate <IChannel> pred)
        {
            var id = _channelMgr.RemoveChannel(pred);

            OnChannelDisposed.Raise(this, new ChannelEventArgs(id));
        }
Beispiel #4
0
 /// <summary>
 /// Disposes and removes a channel from this server
 /// </summary>
 /// <param name="id">The ID of the channel to remove</param>
 public void DisposeChannel(int id)
 {
     _channelMgr.RemoveChannel(id);
     OnChannelDisposed.Raise(this, new ChannelEventArgs(id));
 }