UriParser.IsWellFormedOriginalString(Uri) 方法

定义

指示 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。The URI to check.

返回

如果 true 格式良好,则为 uri;否则为 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.

适用于