Exemple #1
0
 public HelloWorldController(
     TetraPakApiAuthConfig authConfig,
     IClientCredentialsService credentialsService,
     ITimeLimitedRepositories cache)
     : base(authConfig)
 {
     _credentialsService = credentialsService;
     _cache = cache;
 }
        protected BusinessApiController(TetraPakApiAuthConfig authConfig)
        {
            AuthConfig = authConfig;
            var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT", EnvironmentVariableTarget.Process);

            if (string.IsNullOrEmpty(environment))
            {
                environment = Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT", EnvironmentVariableTarget.Process);
            }

            if (string.IsNullOrEmpty(environment))
            {
                environment = "Production";
            }
            Logger.Debug($"Initializing controller: {GetType()} (environment={environment})");
        }
 public SamplesController(
     SamplesService backend,
     TetraPakApiAuthConfig authConfig)
     : base(backend, authConfig)
 {
 }
 public ApiGatewayController(TBackendService backendService, TetraPakApiAuthConfig authConfig)
     : base(authConfig)
 {
     BackendService = backendService;
 }