public void AddServer <TStartup>(string serviceName) where TStartup : class { if (string.IsNullOrEmpty(nameof(serviceName))) { throw new ArgumentNullException(nameof(serviceName)); } var port = PortManager.GetAvailablePort(); Ports.Add(port); var serviceHost = GetWebHost <TStartup>(port); Servers.Add(serviceName, serviceHost); ExtraSettings.Add($"Services:{serviceName}:Endpoint", $"http://localhost:{port}"); }
public void AddExtraSettings(Action <JsonSerializerSettings> action) { Guard.AgainstNull(action, nameof(action)); ExtraSettings.Add(action); }