UriParser.IsWellFormedOriginalString(Uri) UriParser.IsWellFormedOriginalString(Uri) UriParser.IsWellFormedOriginalString(Uri) Method

定义

指示 URI 是否是格式良好的。Indicates whether a URI is well-formed.

protected:
 virtual bool IsWellFormedOriginalString(Uri ^ uri);
protected virtual bool IsWellFormedOriginalString (Uri uri);
abstract member IsWellFormedOriginalString : Uri -> bool
override this.IsWellFormedOriginalString : Uri -> bool

参数

uri
Uri Uri Uri

要检查的 URI。The URI to check.

返回

如果 uri 格式良好,则为 true;否则为 falsetrue if uri is well-formed; otherwise, false.

注解

IsWellFormedOriginalString方法将返回 false,如果:The IsWellFormedOriginalString method will return false if:

  • 根据 RFC 2396 未正确转义字符串。The string is not correctly escaped per RFC 2396.

  • 该字符串表示引用的隐式文件 URI 的绝对 URI。The string represents an absolute URI that references an implicit file URI.

  • 该字符串表示缺少的路径组件之前以正斜杠的绝对 URI。The string represents an absolute URI that is missing a forward slash before the path component.

  • 该字符串包含非转义反斜杠,即使将被视为正斜杠。The string contains unescaped backslashes, even if they will be treated as forward slashes.

适用于