public void SetUrl(string url) { if (string.IsNullOrEmpty(url) && string.IsNullOrEmpty(_setupContext.Host())) { throw new ArgumentException("url must be provided"); } var uri = string.IsNullOrEmpty(url) ? new Uri(url.FixProtocol(_setupContext.UsesHttps())) : new Uri(new Uri(_setupContext.Host().FixProtocol(_setupContext.UsesHttps())), _setupContext.Uri()); _url = uri.OriginalString; }
internal void SetUrl(string url) { if (url.IsEmpty() && _setupContext.Host().IsEmpty()) { throw new ArgumentException("url must be provided"); } var uri = url.IsNotEmpty() ? new Uri(url.FixProtocol(_setupContext.UsesHttps())) : new Uri(new Uri(_setupContext.Host().FixProtocol(_setupContext.UsesHttps())), _setupContext.Uri()); _url = uri.OriginalString; }
public void SetUrl(string url) { url = url.FixPathSlash(); if (url.IsEmpty() && _setupContext.Host().IsEmpty()) { throw new ArgumentException("url must be provided"); } var uri = new Uri((_setupContext.Host() + url).FixProtocol(_setupContext.UsesHttps())); _url = uri.OriginalString; }