示例#1
0
 private static int Main(string[] args)
 {
     // This bootstraps and runs the Jasper
     // application as defined by MyAppRegistry
     // until the executable is stopped
     return(JasperAgent.Run <MyAppRegistry>(args));
 }
示例#2
0
 static int Main(string[] args)
 {
     return(JasperAgent.Run(args, _ =>
     {
         _.Transports.LightweightListenerAt(2601);
     }));
 }
示例#3
0
 static int Main(string[] args)
 {
     return(JasperAgent.Run(args, _ =>
     {
         _.MartenConnectionStringIs(Environment.GetEnvironmentVariable("marten_testing_database"));
     }));
 }
示例#4
0
 static int Main(string[] args)
 {
     return(JasperAgent.Run(args, _ =>
     {
         _.MartenConnectionStringIs("Host=localhost;Port=5433;Database=postgres;Username=postgres;password=postgres");
         _.Include <MartenBackedPersistence>();
     }));
 }
示例#5
0
        static int Main(string[] args)
        {
            return(JasperAgent.Run(args, _ =>
            {
                _.Logging.UseConsoleLogging = true;

                _.Transports.Lightweight.ListenOnPort(2601);
            }));
        }
示例#6
0
        private static int Main(string[] args)
        {
            return(JasperAgent.Run <JasperRegistry>(args, _ =>
            {
                _.Transports.LightweightListenerAt(2600);

                // Using static routing rules to start
                _.Publish.Message <PingMessage>().To("tcp://localhost:2601");

                _.Services.AddSingleton <IHostedService, PingSender>();

                _.Hosting
                .UseUrls("http://localhost:5000")
                .UseKestrel();
            }));
        }
示例#7
0
        static int Main(string[] args)
        {
            return(JasperAgent.Run(args, _ =>
            {
                _.Logging.UseConsoleLogging = true;

                _.Transports.Lightweight.ListenOnPort(2600);

                // Using static routing rules to start
                _.Publish.Message <PingMessage>().To("tcp://localhost:2601");

                _.Services.AddSingleton <IHostedService, PingSender>();

                _.Http
                .UseUrls("http://localhost:5000")
                .UseKestrel();
            }));
        }
        public void smoke_test_calls(SourceType sourceType, string[] args)
        {
            if (sourceType == SourceType.JasperRegistry)
            {
                var registry = new JasperRegistry();
                registry.Handlers.DisableConventionalDiscovery().IncludeType <MessageConsumer>();

                JasperAgent.Run(registry, args).ShouldBe(0);
            }
            else
            {
                var builder = new WebHostBuilder();
                builder.UseStartup <EmptyStartup>().UseJasper(r =>
                {
                    r.Handlers.DisableConventionalDiscovery().IncludeType <MessageConsumer>();
                })
                .RunJasper(args).ShouldBe(0);
            }
        }
示例#9
0
 private static int Main(string[] args)
 {
     return(JasperAgent.Run <SubscriberApp>(args));
 }
示例#10
0
 public static void Main(string[] args)
 {
     JasperAgent.Run <PublisherApp>(args);
 }
示例#11
0
 static int Main(string[] args)
 {
     // The application is configured through the MyApp class
     return(JasperAgent.Run <JasperConfig>(args));
 }
示例#12
0
 private static int Main(string[] args)
 {
     return(JasperAgent.Run <ReceiverApp>(args));
 }
示例#13
0
 public static int Main(string[] args)
 {
     return(JasperAgent.Run <PublisherApp>(args));
 }
示例#14
0
 static int Main(string[] args)
 {
     return(JasperAgent.Run <SenderApp>(args));
 }
示例#15
0
 private static int Main(string[] args)
 {
     return JasperAgent.Run<SenderApp>(args);
 }