TypedRest for .NET 1.3.6
build type-safe fluent-style REST API clients
TypedRest.UriExtensions Class Reference

Provides extension methods for Uri. More...

Static Public Member Functions

static Uri EnsureTrailingSlash (this Uri uri)
 Adds a trailing slash to the URI if it does not already have one.
 
static Uri Join (this Uri baseUri, string relativeUri)
 Resolves a relative URI using this URI as the base. More...
 
static Uri Join (this Uri baseUri, Uri relativeUri)
 Resolves a relative URI using this URI as the base. More...
 

Detailed Description

Provides extension methods for Uri.

Member Function Documentation

◆ Join() [1/2]

static Uri TypedRest.UriExtensions.Join ( this Uri  baseUri,
string  relativeUri 
)
static

Resolves a relative URI using this URI as the base.

Parameters
baseUriThe base URI to resolve from.
relativeUriThe relative URI to resolve. Prepend ./ to imply a trailing slash in baseUri even if it is missing there.
Returns
Debug.Assert(new Uri("http://myhost/path").Join("./subpath") == new Uri("http://myhost/path/subpath"));
static Uri Join(this Uri baseUri, string relativeUri)
Resolves a relative URI using this URI as the base.

◆ Join() [2/2]

static Uri TypedRest.UriExtensions.Join ( this Uri  baseUri,
Uri  relativeUri 
)
static

Resolves a relative URI using this URI as the base.

Parameters
baseUriThe base URI to resolve from.
relativeUriThe relative URI to resolve. Prepend ./ to imply a trailing slash in baseUri even if it is missing there.
Returns
Debug.Assert(new Uri("http://myhost/path").Join(new Uri("./subpath", UriKind.Relative)) == new Uri("http://myhost/path/subpath"));

The documentation for this class was generated from the following file: