using Microsoft.AspNetCore.Hosting;
namespace Amazon.Lambda.AspNetCoreServer
{
///
/// ApplicationLoadBalancerFunction 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 ApplicationLoadBalancerFunction : ApplicationLoadBalancerFunction where TStartup : class
{
///
/// Default Constructor. The ASP.NET Core Framework will be initialized as part of the construction.
///
protected ApplicationLoadBalancerFunction()
: base()
{
}
///
///
///
/// Configure when the ASP.NET Core framework will be initialized
protected ApplicationLoadBalancerFunction(StartupMode startupMode)
: base(startupMode)
{
}
///
///
protected override void Init(IWebHostBuilder builder)
{
builder.UseStartup();
}
}
}