private static void Main(string[] args) { HostFactory.Run(serviceConfig => { serviceConfig.Service <LoadApplication>(Srv => { Srv.ConstructUsing(name => new LoadApplication()); Srv.WhenStarted(execute => execute.Start()); Srv.WhenStopped(execute => execute.Stop()); }); serviceConfig.SetServiceName("SagaService"); serviceConfig.SetDisplayName("Saga Service"); serviceConfig.SetDescription("This is a service processing all saga events"); serviceConfig.StartAutomatically(); }); }
static void Main(string[] args) { HostFactory.Run(serviceConfig => { serviceConfig.Service <LoadApplication>(Srv => { Srv.ConstructUsing(name => new LoadApplication()); Srv.WhenStarted(execute => execute.Start()); Srv.WhenStopped(execute => execute.Stop()); }); serviceConfig.SetServiceName("NotificationService"); serviceConfig.SetDisplayName("Notification Service"); serviceConfig.SetDescription("This service will notify the end user about the activity."); serviceConfig.StartAutomatically(); }); }
public static void Main(string[] args) { Console.Title = "Payment"; HostFactory.Run(serviceConfig => { serviceConfig.Service <LoadApplication>(Srv => { Srv.ConstructUsing(name => new LoadApplication()); Srv.WhenStarted(execute => execute.Start()); Srv.WhenStopped(execute => execute.Stop()); }); serviceConfig.SetServiceName("PaymentService"); serviceConfig.SetDisplayName("Payment Service"); serviceConfig.SetDescription("This is a service processing all the payments made by students"); serviceConfig.StartAutomatically(); }); }