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
Exceptions
UrlBuilderBase(Uri, string)
Initializes a new instance of the UrlBuilderBase<T> class.
public UrlBuilderBase(Uri baseUrl, string resource)
Parameters
Exceptions
Methods
AddQueryString(string, string)
Adds or replaces a query string parameter.
protected void AddQueryString(string name, string value)
Parameters
AddUrlSegment(string, string)
Adds or replaces a URL segment based on name.
protected void AddUrlSegment(string name, string value)
Parameters
name
stringName of the segment (without the curly braces).
value
stringValue 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
WithValue(string, string)
Adds an arbitrary query string parameter.
public T WithValue(string name, string value)
Parameters
Returns
- T
Current object to allow fluent configuration.