Show / Hide Table of Contents

Class UrlUtility

Provides URL utility methods.

Inheritance
System.Object
UrlUtility
Implements
IUrlUtility
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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.

Microsoft.Extensions.Logging.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
System.String url

The URL.

System.String path

The path.

Returns
Type Description
System.String

The combined URL and path.

IsAbsoluteUrl(String)

Indicates whether the URL is absolute.

Declaration
public bool IsAbsoluteUrl(string url)
Parameters
Type Name Description
System.String url

The URL.

Returns
Type Description
System.Boolean

true if the URL is absolute; otherwise false.

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
System.String url

The relative URL.

Returns
Type Description
System.String

The absolute URL.

ToHttpsUrl(String)

Converts an HTTPS URL to an HTTPS URL.

Declaration
public string ToHttpsUrl(string url)
Parameters
Type Name Description
System.String url

The HTTP URL.

Returns
Type Description
System.String

The HTTPS URL.

Implements

IUrlUtility
In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2022. All rights reserved.