Table of Contents

Class UrlUtility

Namespace
ComponentSpace.Saml2.Utility
Assembly
ComponentSpace.Saml2.dll

Provides URL utility methods.

public class UrlUtility : IUrlUtility
Inheritance
UrlUtility
Implements
Inherited Members

Constructors

UrlUtility(IHttpRequest, ILoggerFactory)

Initializes a new instance of the UrlUtility class.

public UrlUtility(IHttpRequest request, ILoggerFactory loggerFactory)

Parameters

request IHttpRequest

The HTTP request.

loggerFactory ILoggerFactory

The logger factory.

Methods

AppendPath(string, string)

Appends a path to the URL.

public string AppendPath(string url, string path)

Parameters

url string

The URL.

path string

The path.

Returns

string

The combined URL and path.

IsAbsoluteUrl(string)

Indicates whether the URL is absolute.

public bool IsAbsoluteUrl(string url)

Parameters

url string

The URL.

Returns

bool

true if the URL is absolute; otherwise false.

LogRequest()

Logs the HTTP request.

public void LogRequest()

ToAbsoluteUrl(string)

Converts a relative URL to an absolute URL.

public string ToAbsoluteUrl(string url)

Parameters

url string

The relative URL.

Returns

string

The absolute URL.

ToHttpsUrl(string)

Converts an HTTPS URL to an HTTPS URL.

public string ToHttpsUrl(string url)

Parameters

url string

The HTTP URL.

Returns

string

The HTTPS URL.