UrlUtility Class

Provides utility methods for URLs.

Definition

Namespace: SMath.Manager.Network
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.2.9018.0
C#
public static class UrlUtility
Inheritance
Object    UrlUtility

Methods

AppendArgs Appends the specified arguments to the URL string.
Combine Builds a URL string from the specified parts.
InsertLocalePrefix Inserts a locale prefix between Authority and PathAndQuery of the specified URL string.
LocalePrefix Determines the locale prefix of URL by the specified language abbreviation.
PrepareWorkingServerUrl

Parses the specified string as an absolute URI and preserves only its starting part which can be considered as valid WorkingServerUrl.

  • Unless the string is parsed as Uri of type Absolute it is returned without any changes.
  • If a valid culture name is found in AbsolutePath then the found culture name and all subsequent path segments are removed.
  • Query is always removed.

See Also