C# Class System.UriExtensions

Provides useful Uri extension methods.
Datei anzeigen Open project: alien-mcl/URSA

Public Methods

Method Description
AddFragment ( this uri, string fragment ) : Uri

Adds a fragment to given uri.

If the uri already has a fragment, it will be converted to segment.

AddName ( this uri, string name ) : Uri

Adds a name to given URN.

Appended name will start with dot (.).

Combine ( this uri, Uri baseUri ) : Uri

Combines two Uris altogether, without checking if the base one is an absolute uri.

ToRelativeUri ( this uri ) : Uri

Converts a given uri to a relative one.

Method Details

AddFragment() public static method

Adds a fragment to given uri.
If the uri already has a fragment, it will be converted to segment.
public static AddFragment ( this uri, string fragment ) : Uri
uri this Uri to add fragment to.
fragment string Fragment to be added.
return Uri

AddName() public static method

Adds a name to given URN.
Appended name will start with dot (.).
public static AddName ( this uri, string name ) : Uri
uri this Uri to add name to.
name string Name to be added.
return Uri

Combine() public static method

Combines two Uris altogether, without checking if the base one is an absolute uri.
public static Combine ( this uri, Uri baseUri ) : Uri
uri this Relative uri to be appended.
baseUri Uri Base uri.
return Uri

ToRelativeUri() public static method

Converts a given uri to a relative one.
public static ToRelativeUri ( this uri ) : Uri
uri this Uri to be converted.
return Uri