public static IWebHostBuilder UseStartup(this IWebHostBuilder hostBuilder,
                                                 IPact pact,
                                                 IEnumerable <Claim> claims = null,
                                                 Action <IServiceCollection> configureServices = null,
                                                 Action <IApplicationBuilder> configure        = null,
                                                 Type startupType = null)
        {
            if (pact == null)
            {
                throw new ArgumentNullException(nameof(pact));
            }
            if (pact.Configuration != null)
            {
                hostBuilder.ConfigureLogging(factory =>
                {
                    var log = new LogWrapper(pact.Configuration);
                    factory.AddProvider(log);
                });
            }
            var startup = new Startup(startupType)
            {
                ConfigureCallback         = configure,
                ConfigureServicesCallback = configureServices
            };

            foreach (var claim in claims ?? Enumerable.Empty <Claim>())
            {
                startup.AddClaim(claim);
            }
            hostBuilder.ConfigureServices(sc => startup.ConfigureServices(sc));
            hostBuilder.Configure(startup.Configure);
            return(hostBuilder);
        }