// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AspNetCore.Hosting.Internal { public class StartupMethods { internal static Func DefaultBuildServiceProvider = s => s.BuildServiceProvider(); public StartupMethods(Action configure) : this(configure, configureServices: null) { } public StartupMethods(Action configure, Func configureServices) { ConfigureDelegate = configure; ConfigureServicesDelegate = configureServices ?? DefaultBuildServiceProvider; } public Func ConfigureServicesDelegate { get; } public Action ConfigureDelegate { get; } } }