private static void Main(string[] args) { var containerBootstrapper = new ContainerBootstrapper(); var ss = new NotifyConsumerStarter( containerBootstrapper, ConfigurationManager.AppSettings["NotifyConsumerEndpoint_BaseAddressServiceUrl"], ConfigurationManager.AppSettings["NotifyConsumerSignalRHubEndpoint_AddressServiceUrl"] ); ss.StartServices(); Console.ReadKey(); }
/// <summary> /// The main entry point for the application. /// </summary> private static void Main() { var containerBootstrapper = new ContainerBootstrapper(); var notifyConsumerStarter = new NotifyConsumerStarter( containerBootstrapper, ConfigurationManager.AppSettings["NotifyConsumerEndpoint_BaseAddressServiceUrl"], ConfigurationManager.AppSettings["NotifyConsumerSignalRHubEndpoint_AddressServiceUrl"] ); var servicesToRun = new ServiceBase[] { new WindowsServiceHostNotifyConsumer(notifyConsumerStarter) }; ServiceBase.Run(servicesToRun); }
public WindowsServiceHostNotifyConsumer(NotifyConsumerStarter notifyConsumerStarter) { InitializeComponent(); _notifyConsumerStarter = notifyConsumerStarter; }