-
Notifications
You must be signed in to change notification settings - Fork 501
Expand file tree
/
Copy pathProgram.cs
More file actions
30 lines (22 loc) · 997 Bytes
/
Copy pathProgram.cs
File metadata and controls
30 lines (22 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
using Amazon.Lambda.TestTool;
using Amazon.Lambda.TestTool.Commands;
using Amazon.Lambda.TestTool.Extensions;
using Amazon.Lambda.TestTool.Services;
using Spectre.Console.Cli;
// Till we do the full inspection for collection maintain the S3 behavior for initializing collections.
Amazon.AWSConfigs.InitializeCollections = true;
var serviceCollection = new ServiceCollection();
serviceCollection.AddCustomServices();
var registrar = new TypeRegistrar(serviceCollection);
var app = new CommandApp(registrar);
app.Configure(config =>
{
config.AddCommand<RunCommand>("start")
.WithDescription("Start the Lambda and/or API Gateway emulator.");
config.AddCommand<ToolInfoCommand>("info")
.WithDescription("Display information about the tool including the version number.");
config.SetApplicationName(Constants.ToolName);
});
return await app.RunAsync(args);