/// <summary> /// For use with IGameHostBuilder. /// </summary> /// <param name="builder"></param> /// <param name="featureCollection"></param> public TestServer(IGameHostBuilder builder, IFeatureCollection featureCollection) : this(featureCollection) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } var host = builder.UseServer(this).Build(); host.StartAsync().GetAwaiter().GetResult(); _hostInstance = host; }