Exemplo n.º 1
0
        internal T CreateChannel <T>() where T : IClientChannel
        {
            var channel = (T)_channelManager.CreateChannel <T>();

            channel.Client = this;
            return(channel);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a channel and assigns a valid ID, port and manager to it
 /// </summary>
 /// <remarks>
 /// It is recommended to use this method whenever you wish to create a new channel.
 /// The only reason not to use this method is if you wish to create a channel with a specific ID
 /// which may cause issues
 /// </remarks>
 /// <typeparam name="T">The type of channel to create</typeparam>
 /// <returns>Returns a newly created channel ready to be added</returns>
 public T CreateChannel <T>() where T : IServerChannel
 {
     return((T)_channelMgr.CreateChannel <T>());
 }