コード例 #1
0
        internal Uri GetFullUrlFromHttpTextBox()
        {
            var newUrlText     = this.httpUrlTextBox.Text.ToLower();
            var protocolPrefix = this.ProtocolComboBox.Text.ToLower();

            if (!newUrlText.StartsWith(KnownConnectionConstants.HTTP.ToLower()) &&
                !newUrlText.StartsWith(KnownConnectionConstants.HTTPS.ToLower()))
            {
                newUrlText = String.Format("{0}://{1}", protocolPrefix, newUrlText);
            }
            return(UrlConverter.TryParseUrl(newUrlText));
        }