Table of Contents

Class UrlBuilderBase<T>

Namespace
Auth0.AuthenticationApi.Builders
Assembly
Auth0.AuthenticationApi.dll

Base class for all strongly-typed fluent URL builders.

public class UrlBuilderBase<T> where T : UrlBuilderBase<T>

Type Parameters

T

Type of inherited class to faciliate fluent chaining.

Inheritance
UrlBuilderBase<T>
Derived
Inherited Members

Constructors

UrlBuilderBase(string, string)

Initializes a new instance of the UrlBuilderBase<T> class.

public UrlBuilderBase(string baseUrl, string resource)

Parameters

baseUrl string

Base URL represented as a string.

resource string

Resource being accessed.

Exceptions

ArgumentNullException

UrlBuilderBase(Uri, string)

Initializes a new instance of the UrlBuilderBase<T> class.

public UrlBuilderBase(Uri baseUrl, string resource)

Parameters

baseUrl Uri

Base URL represented as a Uri.

resource string

Resource being accessed.

Exceptions

ArgumentNullException

Methods

AddQueryString(string, string)

Adds or replaces a query string parameter.

protected void AddQueryString(string name, string value)

Parameters

name string

Name of the query string parameter.

value string

Value of the query string parameter.

AddUrlSegment(string, string)

Adds or replaces a URL segment based on name.

protected void AddUrlSegment(string name, string value)

Parameters

name string

Name of the segment (without the curly braces).

value string

Value the segment should contain.

Remarks

When specifying the resource, a URL segment can be specified with curly braces. For example, the resource can specified as "samlp/{client}". This method can be used to specify a value for the {client} segment of the resource.

Build()

Builds the complete URL based on the values added so far.

public Uri Build()

Returns

Uri

Uri containing the complete URL.

WithValue(string, string)

Adds an arbitrary query string parameter.

public T WithValue(string name, string value)

Parameters

name string

Name of the query string parameter.

value string

Value of the query string parameter.

Returns

T

Current object to allow fluent configuration.