/// <summary>
 /// Normalizes a host value.
 /// </summary>
 public NormalizedHttpHost(string host)
 {
     if (host == null)
         throw new ArgumentNullException(nameof(host));
     if (host == "")
         throw new ArgumentException("Host is required.", nameof(host));
     _host = new NormalizedHost(host);
 }
Beispiel #2
0
 /// <summary>
 /// Normalizes a host value.
 /// </summary>
 public NormalizedHttpHost(string?host)
 {
     if (host == null)
     {
         throw new ArgumentNullException(nameof(host));
     }
     if (host.Length == 0)
     {
         throw new ArgumentException("Host is required.", nameof(host));
     }
     _host = new NormalizedHost(host);
 }