IInteractive.WebConsole.HtmlParser.IsCorrectScheme C# (CSharp) 메소드

IsCorrectScheme() 공개 메소드

public IsCorrectScheme ( string match ) : bool
match string
리턴 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;
        }