IInteractive.WebConsole.HtmlParser.IsCorrectScheme C# (CSharp) Méthode

IsCorrectScheme() public méthode

public IsCorrectScheme ( string match ) : bool
match string
Résultat bool
        public bool IsCorrectScheme(string match)
        {
            bool correctScheme = false;
            try
            {
                Uri testUri = new Uri(HttpRequestResult.ResultUrl, match);
                correctScheme = testUri.Scheme.Equals("http", StringComparison.CurrentCultureIgnoreCase)
                    || testUri.Scheme.Equals("https", StringComparison.CurrentCultureIgnoreCase);
            } 
            catch(UriFormatException) 
            {
                correctScheme = true;
            }
            return correctScheme;
        }