public ApplicationCore(IContainer c) { container = c; model = container.Resolve<Model>(); logService = container.Resolve<LogService>(); connectionController = c.Resolve<ConnectionController>(); //Don't send two request went doing a post.. ServicePointManager.Expect100Continue = false; //Don't limit connections to a single node - 100 I think is the upper limit. ServicePointManager.DefaultConnectionLimit = 100; //System.Net.ServicePointManager.MaxServicePointIdleTime = 20000000; updateChecker = container.Resolve<UpdateCheckerService>(); interfaceController = container.Resolve<InterfaceController>(); overlordManagerService = container.Resolve<OverlordManagerService>(); singleInstanceService = new SingleInstanceService("FAP"); registerProtocolService = new RegisterProtocolService(); }
private void Run() { if(Compose()) { logService = container.Resolve<LogService>(); logService.Filter = LogLevel.Trace; model = container.Resolve<Model>(); model.Messages.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Messages_CollectionChanged); ApplicationCore core = new ApplicationCore(container); core.Load(true); core.StartOverlordServer(); System.Console.WriteLine("Server started"); System.Console.ReadKey(); } else { System.Console.WriteLine("Program composition failed"); System.Console.ReadKey(); } }