SonarLint.VisualStudio.Integration.Connection.UriValidator.IsValidUri C# (CSharp) Method

IsValidUri() public method

Whether or not uri is considered to be a valid URI.
Valid URIs must have a scheme listed in supportedSchemes and be absolute.
public IsValidUri ( Uri uri ) : bool
uri System.Uri to check, must not be null.
return bool
        public virtual bool IsValidUri(Uri uri)
        {
            if (uri == null)
            {
                throw new ArgumentNullException(nameof(uri));
            }

            // absolute
            if (!uri.IsAbsoluteUri)
            {
                return false;
            }

            // supported
            if (!this.IsSupportedScheme(uri))
            {
                return false;
            }

            return true;
        }
    }

Same methods

UriValidator::IsValidUri ( string uriString ) : bool