Beispiel #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            ObjectFactory.Initialize(x => x.PullConfigurationFromAppConfig = true);
            var poller = new Poller(
                ObjectFactory.GetInstance<ISourceRepository>(),
                ObjectFactory.GetInstance<IChat>(),
                ObjectFactory.GetInstance<ILogger>(),
                ObjectFactory.GetInstance<IMessageGenerator>());

            ServiceBase.Run(new WindowsService(poller));
        }
Beispiel #2
0
 public WindowsService(Poller poller)
 {
     ServiceName = "Poller";
     _poller = poller;
     InitializeComponent();
 }