C# Класс FluentUri.FluentUriBuilder

Показать файл Открыть проект

Открытые методы

Метод Описание
Create ( ) : FluentUriBuilder
Credentials ( string user, string password ) : FluentUriBuilder

Sets or updates the user credentials (user name and password) in the URI.

DefaultPort ( ) : FluentUriBuilder

Updates the URI to use the default port for the protocol.

Fragment ( string fragment ) : FluentUriBuilder

Sets or updates the fragment part of the URI.

From ( string baseUri ) : FluentUriBuilder
Host ( string host ) : FluentUriBuilder

Sets or updates the hostname of the URI.

Path ( string path ) : FluentUriBuilder

Sets or updates the local path in the URI.

Port ( int port ) : FluentUriBuilder

Sets or updates the port number in the URI.

QueryParam ( string key, string value ) : FluentUriBuilder

Adds a query parameter to the URI.

QueryParams ( object>.IDictionary queryParams ) : FluentUriBuilder

Sets the query parameters of the URI.

QueryParams ( object queryParams ) : FluentUriBuilder

Sets the query parameters of the URI.

RemoveCredentials ( ) : FluentUriBuilder

Removes the user name and password from the URI.

RemoveFragment ( ) : FluentUriBuilder

Removes the fragment part of the URI.

RemovePath ( ) : FluentUriBuilder

Removes the local path from the URI.

RemovePort ( ) : FluentUriBuilder

Removes the port number from the URI.

RemoveQueryParams ( ) : FluentUriBuilder

Removes all query parameters from the URI.

Scheme ( UriScheme scheme ) : FluentUriBuilder

Sets or updates the protocol scheme of the URI.

ToString ( ) : string

Returns the URI build by this instance as a string.

ToUri ( ) : Uri

Creates a new Uri instance from the values specified.

Приватные методы

Метод Описание
FluentUriBuilder ( string baseUri ) : System
initializeQueryParamsList ( ) : void

Описание методов

Create() публичный статический Метод

public static Create ( ) : FluentUriBuilder
Результат FluentUriBuilder

Credentials() публичный Метод

Sets or updates the user credentials (user name and password) in the URI.
/// If either of the arguments specified is null. ///
public Credentials ( string user, string password ) : FluentUriBuilder
user string /// The new value of the user. ///
password string /// The new value of the password. ///
Результат FluentUriBuilder

DefaultPort() публичный Метод

Updates the URI to use the default port for the protocol.
public DefaultPort ( ) : FluentUriBuilder
Результат FluentUriBuilder

Fragment() публичный Метод

Sets or updates the fragment part of the URI.
/// If the fragment specified is null. ///
public Fragment ( string fragment ) : FluentUriBuilder
fragment string /// The new value of the URI fragment. If empty, the base URI fragment is deleted. ///
Результат FluentUriBuilder

From() публичный статический Метод

public static From ( string baseUri ) : FluentUriBuilder
baseUri string
Результат FluentUriBuilder

Host() публичный Метод

Sets or updates the hostname of the URI.
/// If the hostname specified is a null or empty , /// or it only contains white space. ///
public Host ( string host ) : FluentUriBuilder
host string /// The new value of the hostname. Cannot be null or white space. ///
Результат FluentUriBuilder

Path() публичный Метод

Sets or updates the local path in the URI.
public Path ( string path ) : FluentUriBuilder
path string /// The new value of the local path. ///
Результат FluentUriBuilder

Port() публичный Метод

Sets or updates the port number in the URI.
/// If is less than -1 or greater than 65535. ///
public Port ( int port ) : FluentUriBuilder
port int /// An integer between -1 and 65535, inclusive. -1 indicates that the default /// port number for the protocol is to be used. ///
Результат FluentUriBuilder

QueryParam() публичный Метод

Adds a query parameter to the URI.
/// If either or is null or empty. ///
public QueryParam ( string key, string value ) : FluentUriBuilder
key string /// The key (name) of the query parameter. ///
value string /// The value of the query parameter. ///
Результат FluentUriBuilder

QueryParams() публичный Метод

Sets the query parameters of the URI.
/// If is null; ///
public QueryParams ( object>.IDictionary queryParams ) : FluentUriBuilder
queryParams object>.IDictionary /// The query parameters to add to the URI. ///
Результат FluentUriBuilder

QueryParams() публичный Метод

Sets the query parameters of the URI.
/// If is null; ///
public QueryParams ( object queryParams ) : FluentUriBuilder
queryParams object /// The object containing the query parameters to add to the URI. Property names /// and their values are used as parameter keys and values. ///
Результат FluentUriBuilder

RemoveCredentials() публичный Метод

Removes the user name and password from the URI.
public RemoveCredentials ( ) : FluentUriBuilder
Результат FluentUriBuilder

RemoveFragment() публичный Метод

Removes the fragment part of the URI.
public RemoveFragment ( ) : FluentUriBuilder
Результат FluentUriBuilder

RemovePath() публичный Метод

Removes the local path from the URI.
public RemovePath ( ) : FluentUriBuilder
Результат FluentUriBuilder

RemovePort() публичный Метод

Removes the port number from the URI.
public RemovePort ( ) : FluentUriBuilder
Результат FluentUriBuilder

RemoveQueryParams() публичный Метод

Removes all query parameters from the URI.
public RemoveQueryParams ( ) : FluentUriBuilder
Результат FluentUriBuilder

Scheme() публичный Метод

Sets or updates the protocol scheme of the URI.
public Scheme ( UriScheme scheme ) : FluentUriBuilder
scheme UriScheme /// The new value of the protocol scheme. ///
Результат FluentUriBuilder

ToString() публичный Метод

Returns the URI build by this instance as a string.
public ToString ( ) : string
Результат string

ToUri() публичный Метод

Creates a new Uri instance from the values specified.
public ToUri ( ) : Uri
Результат System.Uri