-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update header logic and add test cases
- Loading branch information
1 parent
2894ef3
commit 93c9dfd
Showing
3 changed files
with
266 additions
and
83 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
48 changes: 24 additions & 24 deletions
48
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Extensions/ServiceCollectionExtensions.cs
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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
using Amazon.Lambda.TestTool.Services; | ||
using Amazon.Lambda.TestTool.Services.IO; | ||
using Microsoft.Extensions.DependencyInjection.Extensions; | ||
|
||
namespace Amazon.Lambda.TestTool.Extensions; | ||
|
||
/// <summary> | ||
/// A class that contains extension methods for the <see cref="IServiceCollection"/> interface. | ||
/// </summary> | ||
public static class ServiceCollectionExtensions | ||
{ | ||
using Amazon.Lambda.TestTool.Services; | ||
using Amazon.Lambda.TestTool.Services.IO; | ||
using Microsoft.Extensions.DependencyInjection.Extensions; | ||
|
||
namespace Amazon.Lambda.TestTool.Extensions; | ||
|
||
/// <summary> | ||
/// A class that contains extension methods for the <see cref="IServiceCollection"/> interface. | ||
/// </summary> | ||
public static class ServiceCollectionExtensions | ||
{ | ||
/// <summary> | ||
/// Adds a set of services for the .NET CLI portion of this application. | ||
/// </summary> | ||
public static void AddCustomServices(this IServiceCollection serviceCollection, | ||
ServiceLifetime lifetime = ServiceLifetime.Singleton) | ||
{ | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IToolInteractiveService), typeof(ConsoleInteractiveService), lifetime)); | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IDirectoryManager), typeof(DirectoryManager), lifetime)); | ||
/// </summary> | ||
public static void AddCustomServices(this IServiceCollection serviceCollection, | ||
ServiceLifetime lifetime = ServiceLifetime.Singleton) | ||
{ | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IToolInteractiveService), typeof(ConsoleInteractiveService), lifetime)); | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IDirectoryManager), typeof(DirectoryManager), lifetime)); | ||
} | ||
|
||
/// <summary> | ||
/// Adds a set of services for the API Gateway emulator portion of this application. | ||
/// </summary> | ||
public static void AddApiGatewayEmulatorServices(this IServiceCollection serviceCollection, | ||
ServiceLifetime lifetime = ServiceLifetime.Singleton) | ||
{ | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IApiGatewayRouteConfigService), typeof(ApiGatewayRouteConfigService), lifetime)); | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IEnvironmentManager), typeof(EnvironmentManager), lifetime)); | ||
} | ||
/// </summary> | ||
public static void AddApiGatewayEmulatorServices(this IServiceCollection serviceCollection, | ||
ServiceLifetime lifetime = ServiceLifetime.Singleton) | ||
{ | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IApiGatewayRouteConfigService), typeof(ApiGatewayRouteConfigService), lifetime)); | ||
serviceCollection.TryAdd(new ServiceDescriptor(typeof(IEnvironmentManager), typeof(EnvironmentManager), lifetime)); | ||
} | ||
} |
Oops, something went wrong.