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"); } }
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); }
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); }); }
public override void Configure(JasperHttpRegistry registry) { registry.Http.Actions.IncludeType <ExtensionThing>(); }