public static IAppBuilder UseHealthNet( this IAppBuilder appBuilder, IHealthNetConfiguration configuration, Func <IEnumerable <ISystemChecker> > systemCheckerResolver) { return(appBuilder.UseHealthNet(configuration, new AssemblyFileVersionProvider(configuration), systemCheckerResolver)); }
public HealthCheckService(IHealthNetConfiguration healthNetConfiguration, IVersionProvider versionProvider, IEnumerable <ISystemChecker> systemStateCheckers) { this.healthNetConfiguration = healthNetConfiguration; this.versionProvider = versionProvider; this.systemStateCheckers = systemStateCheckers; }
public DependencyResolver(IHealthNetConfiguration configuration, IVersionProvider versionProvider, IEnumerable <ISystemChecker> checkers) { this.configuration = configuration; this.versionProvider = versionProvider; this.checkers = checkers; }
public IAppBuilder Configure(IAppBuilder app, IHealthNetConfiguration configuration, IEnumerable <ISystemChecker> checkers) { return(app.UseHealthNet(configuration, () => { var systemCheckers = checkers as ISystemChecker[] ?? checkers.ToArray(); return systemCheckers; })); }
public IAppBuilder Configure(IAppBuilder app, IHealthNetConfiguration configuration, IEnumerable<ISystemChecker> checkers) { return app.UseHealthNet(configuration, () => { var systemCheckers = checkers as ISystemChecker[] ?? checkers.ToArray(); return systemCheckers; }); }
public IAppBuilder Configure(IAppBuilder app, IHealthNetConfiguration healthNetConfiguration, IEnumerable<ISystemChecker> checkers) { return app .UseNancy(x => x.Bootstrapper = new ConfigurableBootstrapper( y => y.Module<HealthNetModule>().Module<FooModule>().DisableAutoRegistrations().Dependency(checkers).Dependency(healthNetConfiguration))); }
public HealthCheckController( IHealthNetConfiguration configuration, IVersionProvider versionProvider, IEnumerable <ISystemChecker> checkers) { this.configuration = configuration; this.versionProvider = versionProvider; this.checkers = checkers; }
public HealthNetMiddleware(AppFunc next, IHealthNetConfiguration configuration, IVersionProvider versionProvider, Func <IEnumerable <ISystemChecker> > systemCheckerResolverFactory) { this.next = next; this.configuration = configuration; this.versionProvider = versionProvider; this.systemCheckerResolverFactory = systemCheckerResolverFactory; }
public static IAppBuilder UseHealthNet( this IAppBuilder appBuilder, IHealthNetConfiguration configuration, IVersionProvider versionProvider, Func <IEnumerable <ISystemChecker> > systemCheckerResolver) { appBuilder.Use(typeof(HealthNetMiddleware), configuration, versionProvider, systemCheckerResolver); return(appBuilder); }
public IAppBuilder Configure(IAppBuilder app, IHealthNetConfiguration configuration, IEnumerable<ISystemChecker> checkers) { var httpConfiguration = new HttpConfiguration(); httpConfiguration.Routes.MapHttpRoute( routeTemplate: configuration.Path.Remove(0, 1), name: "HealthCheck", defaults: new { Controller = "HealthCheck" } ); var assemblyResolver = new AssembliesResolver(); httpConfiguration.Services.Replace(typeof(IAssembliesResolver), assemblyResolver); httpConfiguration.DependencyResolver = new DependencyResolver(configuration, checkers); return app.UseWebApi(httpConfiguration); }
public IAppBuilder Configure(IAppBuilder app, IHealthNetConfiguration configuration, IEnumerable <ISystemChecker> checkers) { var httpConfiguration = new HttpConfiguration(); httpConfiguration.Routes.MapHttpRoute( routeTemplate: configuration.Path.Remove(0, 1), name: "HealthCheck", defaults: new { Controller = "HealthCheck" } ); var assemblyResolver = new AssembliesResolver(); httpConfiguration.Services.Replace(typeof(IAssembliesResolver), assemblyResolver); httpConfiguration.DependencyResolver = new DependencyResolver(configuration, checkers); return(app.UseWebApi(httpConfiguration)); }
public HealthNetModule(IHealthNetConfiguration configuration, IEnumerable<ISystemChecker> systemCheckers) : base(configuration.Path) { Get[""] = p => { var healthChecker = new HealthCheckService(configuration, new VersionProvider(configuration), systemCheckers); var intrusive = false; if (Request.Query.intrusive != null) { intrusive = Request.Query.intrusive == "true"; } Action<Stream> performeHealthCheck = stream => new HealthResultJsonSerializer().SerializeToStream(stream, healthChecker.CheckHealth(intrusive)); return new Response { Contents = performeHealthCheck, ContentType = Constants.Response.ContentType.Json + "; charset=utf-8", StatusCode = HttpStatusCode.OK }; }; }
public HealthNetModule(IHealthNetConfiguration configuration, IEnumerable <ISystemChecker> systemCheckers) : base(configuration.Path) { Get[""] = p => { var healthChecker = new HealthCheckService(configuration, new VersionProvider(configuration), systemCheckers); var intrusive = false; if (Request.Query.intrusive != null) { intrusive = Request.Query.intrusive == "true"; } Action <Stream> performeHealthCheck = stream => new HealthResultJsonSerializer().SerializeToStream(stream, healthChecker.CheckHealth(intrusive)); return(new Response { Contents = performeHealthCheck, ContentType = Constants.Response.ContentType.Json + "; charset=utf-8", StatusCode = HttpStatusCode.OK }); }; }
public HealthNetMiddleware(RequestDelegate next, IHealthNetConfiguration configuration) { this.next = next; this.configuration = configuration; serializer = new HealthResultJsonSerializer(); }
public HealthCheckService(IHealthNetConfiguration healthNetConfiguration, IVersionProvider versionProvider, IEnumerable<ISystemChecker> systemStateCheckers) { this.healthNetConfiguration = healthNetConfiguration; this.versionProvider = versionProvider; this.systemStateCheckers = systemStateCheckers; }
public HealthCheckController(IHealthNetConfiguration configuration, IEnumerable <ISystemChecker> checkers) { this.configuration = configuration; this.checkers = checkers; }
public DependencyResolver(IHealthNetConfiguration configuration, IEnumerable<ISystemChecker> checkers) { this.configuration = configuration; this.checkers = checkers; }
public VersionProvider(IHealthNetConfiguration healthNetConfiguration) { this.healthNetConfiguration = healthNetConfiguration; }
public HealthNetMiddleware(AppFunc next, IHealthNetConfiguration configuration, Func<IEnumerable<ISystemChecker>> systemCheckerResolverFactory) { this.next = next; this.configuration = configuration; this.systemCheckerResolverFactory = systemCheckerResolverFactory; }
public AssemblyFileVersionProvider(IHealthNetConfiguration healthNetConfiguration) { this.healthNetConfiguration = healthNetConfiguration; }
public HealthNetModule( IHealthNetConfiguration configuration, IEnumerable <ISystemChecker> systemCheckers) : this(configuration, new AssemblyFileVersionProvider(configuration), systemCheckers) { }
public static IAppBuilder UseHealthNet(this IAppBuilder appBuilder, IHealthNetConfiguration configuration, Func<IEnumerable<ISystemChecker>> systemCheckerResolver) { appBuilder.Use(typeof(HealthNetMiddleware), configuration, systemCheckerResolver); return appBuilder; }
public HealthCheckController( IHealthNetConfiguration configuration, IEnumerable <ISystemChecker> checkers) : this(configuration, new AssemblyFileVersionProvider(configuration), checkers) { }
public HealthCheckController(IHealthNetConfiguration configuration, IEnumerable<ISystemChecker> checkers) { this.configuration = configuration; this.checkers = checkers; }