/// <summary> /// The real entry point of program /// </summary> public static void Load(Action<UserConfiguration> register) { if (IsReboot) { if (!PlatformCompact.Checkout()) { return; } IsReboot = true; } else { Release(); } // Load the configuration and booting the server. UserConfiguration config = new ConfigurationLoader().Load(); Session.Init(config.SessionLifetime); IDispatcher dispatcher = new DispatcherImpl(); dispatcher.SetCacheDriver(new FileSystemCacheDriver()); courseServer = new Server(config.ServerInfo); courseServer.AddHandleListener(dispatcher.Handle); register(config); courseServer.Start(); }
public SlowDispatcher(Config config, IDispatcherPrerequisites prerequisites) : base(config, prerequisites) { _instance = new DispatcherImpl(this); }