Mono Class Library: System.Uri Overview | Members

System.Uri.Canonicalize Method

Converts the components of the URI represented by the current instance to canonical form.

[System.Obsolete("This method does nothing, it has been obsoleted")]
protected virtual void Canonicalize ()

Remarks

Operation
This method converts the URI to a format suitable for machine interpretation according to the scheme of the current instance. The conversions are required to preserve all information that could, if removed or altered, change the URI represented by the current instance.

This method performs the following conversions:

  • Converts file references to the format of the current platform, for example on a Windows system, file://c|/AFile.txt is converted to "file:///c:/AFile.txt".
  • Converts any backslash characters ('\') to forward slashes ('/').
  • Compresses multiple consecutive forward slashes ('/') in the path component to a single forward slash.
  • Compresses any path meta sequences ("/." and "/..").

Note to Inheritors
Override this method to canonicalize the type derived from Uri .

Usage
Applications do not call this method; it is called by constructors after parsing the URI and escaping the components.

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0