예제 #1
0
        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();
            });
        }
예제 #2
0
        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();
            });
        }
예제 #3
0
        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();
            });
        }