-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added startup file, added Healthcontroller there
- Loading branch information
1 parent
7b0c035
commit 5906ee8
Showing
3 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Equinor.SubSurfAppManagementMonitoringNuGet.Controllers; | ||
using Equinor.SubSurfAppManagementMonitoringNuget.Helpers; | ||
using Equinor.SubSurfAppManagementMonitoringNuget.Services; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace Equinor.SubSurfAppManagementMonitoringNuGet; | ||
|
||
public static class Startup | ||
{ | ||
/// <summary> | ||
/// Configure all services for the nuget package | ||
/// </summary> | ||
/// <param name="services"></param> | ||
/// <param name="Configuration"></param> | ||
public static void Configure(IServiceCollection services, IConfiguration Configuration) | ||
{ | ||
ConfigureServices(services, Configuration); | ||
} | ||
|
||
private static void ConfigureServices(IServiceCollection services, IConfiguration configuration) | ||
{ | ||
services.AddSingleton<IEnvironment, EnvironmentWrapper>(); | ||
services.AddTransient<IHealthCheckerService, DefaultHealthCheckerService>(); | ||
services.AddMvc().AddApplicationPart(typeof(HealthController).Assembly); | ||
} | ||
} |