Class UrlUtility
Provides URL utility methods.
Implements
Inherited Members
Namespace: ComponentSpace.Saml2.Utility
Assembly: ComponentSpace.Saml2.dll
Syntax
public class UrlUtility : IUrlUtility
  Constructors
UrlUtility(IHttpRequest, ILoggerFactory)
Initializes a new instance of the UrlUtility class.
Declaration
public UrlUtility(IHttpRequest request, ILoggerFactory loggerFactory)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IHttpRequest | request | The HTTP request.  | 
      
| ILoggerFactory | loggerFactory | The logger factory.  | 
      
Methods
AppendPath(string, string)
Appends a path to the URL.
Declaration
public string AppendPath(string url, string path)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | url | The URL.  | 
      
| string | path | The path.  | 
      
Returns
| Type | Description | 
|---|---|
| string | The combined URL and path.  | 
      
IsAbsoluteUrl(string)
Indicates whether the URL is absolute.
Declaration
public bool IsAbsoluteUrl(string url)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | url | The URL.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
LogRequest()
Logs the HTTP request.
Declaration
public void LogRequest()
  ToAbsoluteUrl(string)
Converts a relative URL to an absolute URL.
Declaration
public string ToAbsoluteUrl(string url)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | url | The relative URL.  | 
      
Returns
| Type | Description | 
|---|---|
| string | The absolute URL.  | 
      
ToHttpsUrl(string)
Converts an HTTPS URL to an HTTPS URL.
Declaration
public string ToHttpsUrl(string url)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | url | The HTTP URL.  | 
      
Returns
| Type | Description | 
|---|---|
| string | The HTTPS URL.  |