Improve this Doc View Source

Class UriModifyExtensions

Uri extensions which modify an Uri (return a new one)

Inheritance
System.Object
UriModifyExtensions
Namespace:Dapplo.HttpExtensions
Assembly:Dapplo.HttpExtensions.dll
Syntax
public class UriModifyExtensions

Methods

| Improve this Doc View Source

AppendSegments(Uri, Object[])

Append path segment(s) to the specified Uri

Declaration
public static Uri AppendSegments(Uri uri, params object[] segments)
Parameters
Type Name Description
System.Uri uri

Uri to extend

System.Object[] segments

array of objects which will be added after converting them to strings

Returns
Type Description
System.Uri

new Uri with segments added to the path

| Improve this Doc View Source

ExtendQuery<T>(Uri, IDictionary<String, T>)

Adds query string value to an existing url, both absolute and relative URI's are supported.
Declaration
public static Uri ExtendQuery<T>(Uri uri, IDictionary<string, T> values)
Parameters
Type Name Description
System.Uri uri

Uri to extend

System.Collections.Generic.IDictionary<System.String, T> values

IDictionary with values

Returns
Type Description
System.Uri

Uri with extended query

| Improve this Doc View Source

ExtendQuery<T>(Uri, ILookup<String, T>)

Adds query string value to an existing url, both absolute and relative URI's are supported.
Declaration
public static Uri ExtendQuery<T>(Uri uri, ILookup<string, T> values)
Parameters
Type Name Description
System.Uri uri

Uri to extend the query for

System.Linq.ILookup<System.String, T> values

ILookup with values

Returns
Type Description
System.Uri

Uri with extended query

| Improve this Doc View Source

ExtendQuery<T>(Uri, String, T)

Adds query string value to an existing url, both absolute and relative URI's are supported.
Declaration
public static Uri ExtendQuery<T>(Uri uri, string name, T value)
Parameters
Type Name Description
System.Uri uri

Uri to extend

System.String name

string name of value

T value

value

Returns
Type Description
System.Uri

Uri with extended query

| Improve this Doc View Source

SetCredentials(Uri, String, String)

Sets the userinfo of the Uri

Declaration
public static Uri SetCredentials(Uri uri, string username, string password)
Parameters
Type Name Description
System.Uri uri

Uri to extend

System.String username

username of value

System.String password

password for the user

Returns
Type Description
System.Uri

Uri with extended query