예제 #1
0
        public static JasperStorytellerHost <JasperHttpRegistry> Basic(Action <JasperHttpRegistry> configure = null)
        {
            var jasperRegistry = new JasperHttpRegistry();

            configure?.Invoke(jasperRegistry);

            return(new JasperStorytellerHost <JasperHttpRegistry>(jasperRegistry));
        }
        public void hosting_environment_uses_config_2()
        {
            var registry = new JasperHttpRegistry();

            registry.Handlers.DisableConventionalDiscovery(true);
            registry.Http.UseEnvironment("Fake2");

            using (var runtime = JasperRuntime.For(registry))
            {
                runtime.Get <IHostingEnvironment>()
                .EnvironmentName.ShouldBe("Fake2");
            }
        }
예제 #3
0
        public bootstrapping_end_to_end()
        {
            var registry = new JasperHttpRegistry();

            registry.Http.Actions.ExcludeTypes(_ => _.IsInNamespace("Jasper.Bus"));

            registry.Include <EndpointExtension>();

            registry.Handlers.DisableConventionalDiscovery();

            registry.Services.AddTransient <IWriterRule, CustomWriterRule>();
            registry.Services.AddTransient <IReaderRule, CustomReaderRule>();

            theRuntime = JasperRuntime.For(registry);
        }
예제 #4
0
        private void theAppIs(Action <IApplicationBuilder> configure)
        {
            var registry = new JasperHttpRegistry();

            registry.Handlers.DisableConventionalDiscovery(true);

            _alba = new SystemUnderTest();
            _alba.UseStartup <EmptyStartup>();
            _alba.Configure(builder =>
            {
                builder
                .UseServer(new NulloServer())
                .Configure(configure)
                .UseJasper(registry);
            });
        }
예제 #5
0
 public override void Configure(JasperHttpRegistry registry)
 {
     registry.Http.Actions.IncludeType <ExtensionThing>();
 }