using Microsoft.AspNetCore.Hosting; namespace Amazon.Lambda.AspNetCoreServer { /// /// APIGatewayHttpApiV2ProxyFunction is the base class that is implemented in a ASP.NET Core Web API. The derived class implements /// the Init method similar to Main function in the ASP.NET Core and provides typed Startup. The function handler for /// the Lambda function will point to this base class FunctionHandlerAsync method. /// /// The type containing the startup methods for the application. public abstract class APIGatewayHttpApiV2ProxyFunction : APIGatewayHttpApiV2ProxyFunction where TStartup : class { /// /// Default Constructor. The ASP.NET Core Framework will be initialized as part of the construction. /// protected APIGatewayHttpApiV2ProxyFunction() : base() { } /// /// /// /// Configure when the ASP.NET Core framework will be initialized protected APIGatewayHttpApiV2ProxyFunction(StartupMode startupMode) : base(startupMode) { } /// protected override void Init(IWebHostBuilder builder) { builder.UseStartup(); } } }