예제 #1
0
 public Session Load(FileName fileName)
 {
     if (fileName == null) throw new ArgumentNullException();
     Session session = null;
     Wrappers.MBaseSession session_delegate =
         Wrappers.MSessionFactory.Load(fileName);
     switch (session_delegate.SessionType)
     {
         case Wrappers.SessionType.SessionTypeEmulator:
             /* TODO: Add emulator from file.
             session = new EmulatorSession(session_delegate, null);
             */
             break;
         case Wrappers.SessionType.SessionTypeMedia:
             session = new MediaSession(session_delegate, null);
             break;
         case Wrappers.SessionType.SessionTypeScript:
             session = new NetworkSession(session_delegate, null);
             break;
         case Wrappers.SessionType.SessionTypeUnknown:
             throw new ApplicationException();
     }
     return session;
 }