예제 #1
0
 public void DestroySession(ServiceDestroyMessage serviceDestroy)
 {
                 #if TRACE
     Console.WriteLine(new System.Diagnostics.StackTrace(true).GetFrame(0));
                 #endif
     if (serviceDestroy == null)
     {
         throw new ArgumentNullException("serviceDestroy");
     }
     ObjectBusSession session;
     lock (sessions) {
         //TODO:remove this line
         if (!sessions.ContainsKey(serviceDestroy.SessionID))
         {
             return;
         }
         session = sessions [serviceDestroy.SessionID];
         if (session == systemSession)
         {
             if (sessions.Count != 0)
             {
                 throw new InvalidOperationException("System session must be the last session to be destroyed.");
             }
         }
         sessions.Remove(serviceDestroy.SessionID);
     }
 }
예제 #2
0
 void DestroyHandler(ObjectBusSession session)
 {
                 #if TRACE
     Console.WriteLine(new System.Diagnostics.StackTrace(true).GetFrame(0));
                 #endif
     ServiceDestroyMessage serviceDestroy = new ServiceDestroyMessage(session.SessionID);
     SendMessage(serviceDestroy);
     DestroySession(serviceDestroy);
 }
예제 #3
0
파일: ObjectBus.cs 프로젝트: vebin/BD2
 public void DestroySession(ServiceDestroyMessage serviceDestroy)
 {
     #if TRACE
     Console.WriteLine (new System.Diagnostics.StackTrace (true).GetFrame (0));
     #endif
     if (serviceDestroy == null)
         throw new ArgumentNullException ("serviceDestroy");
     ObjectBusSession session;
     lock (sessions) {
         //TODO:remove this line
         if (!sessions.ContainsKey (serviceDestroy.SessionID))
             return;
         session = sessions [serviceDestroy.SessionID];
         if (session == systemSession) {
             if (sessions.Count != 0) {
                 throw new InvalidOperationException ("System session must be the last session to be destroyed.");
             }
         }
         sessions.Remove (serviceDestroy.SessionID);
     }
 }
예제 #4
0
파일: ObjectBus.cs 프로젝트: vebin/BD2
 void DestroyHandler(ObjectBusSession session)
 {
     #if TRACE
     Console.WriteLine (new System.Diagnostics.StackTrace (true).GetFrame (0));
     #endif
     ServiceDestroyMessage serviceDestroy = new ServiceDestroyMessage (session.SessionID);
     SendMessage (serviceDestroy);
     DestroySession (serviceDestroy);
 }