Example #1
0
        public void Setup()
        {
            task = Task.Run(() => {
                using (var sc = new QueuedSynchronizationContext()) {
                    config = CmpctConfigurationSection.GetConfiguration();
                    SynchronizationContext.SetSynchronizationContext(sc);

                    log  = new Log();
                    ircd = new IRCd(log, config);

                    log.Initialise(ircd, config.Loggers.OfType <LoggerElement>().ToList());
                    ircd.Run();
                    sc.Run();
                }
            }
                            );

            // Hack to give the IRCd long enough to listen before we start trying to connect to it
            // TODO: Can we do without this?
            task.Wait(100);
        }
Example #2
0
 public void Setup()
 {
     config = CmpctConfigurationSection.GetConfiguration();
     log    = new Log();
     ircd   = new IRCd(log, config);
 }