public ISession CreateInternal(int channelNumber)
 {
     lock (m_sessionMap)
     {
         ISession session = new Session(m_connection, channelNumber);
         session.SessionShutdown += HandleSessionShutdown;
         m_sessionMap[channelNumber] = session;
         return session;
     }
 }
 public ISession Create(int channelNumber)
 {
     ISession session;
     lock (m_sessionMap)
     {
         if (m_sessionMap.ContainsKey(channelNumber))
         {
             throw new ChannelAllocationException(channelNumber);
         }
         session = new Session(m_connection, channelNumber);
         session.SessionShutdown += new SessionShutdownEventHandler(HandleSessionShutdown);
         //Console.WriteLine("SessionManager adding session "+session);
         m_sessionMap[channelNumber] = session;
     }
     return session;
 }