Exemplo n.º 1
0
 public MCAdminSession(Server server, bool autoCreate, Type type)
 {
     if (_sessionProvider == null)
     {
         _sessionProvider = new MCAdminSessionProvider(server, autoCreate, type);
     }
     else if (_sessionProvider.Server != server)
     {
         throw new InvalidOperationException("Server differs from that of the Session Provider.");
     }
     Server = server;
     _sessId = Guid.NewGuid();
 }
Exemplo n.º 2
0
 public MCAdminSession(Server server, bool autoCreate, Type type)
 {
     if (_sessionProvider == null)
     {
         _sessionProvider = new MCAdminSessionProvider(server, autoCreate, type);
     }
     else if (_sessionProvider.Server != server)
     {
         throw new InvalidOperationException("Server differs from that of the Session Provider.");
     }
     Server  = server;
     _sessId = Guid.NewGuid();
 }