|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Provides a custom constructor for uniform resource identifiers (URIs) and modifies URIs for the Uri class. More...
#include <UriBuilder.h>
Public Member Functions | |
| UriBuilder () | |
| Initializes a new instance of the UriBuilder class. | |
| UriBuilder (const String &scheme, const String &host) | |
| Initializes a new instance with the specified scheme and host. | |
| UriBuilder (const String &scheme, const String &host, int port) | |
| Initializes a new instance with the specified scheme, host, and port number. | |
| UriBuilder (const String &uri) | |
| Initializes a new instance of the UriBuilder class with the specified URI. | |
| UriBuilder (const Uri &uri) | |
| Initializes a new instance of the UriBuilder class with the specified Uri instance. | |
| String | GetFragment () const |
| Gets the fragment portion of the URI. | |
| String | GetHost () const |
| Gets the Domain Name System (DNS) host name or IP address of a server. | |
| String | GetPassword () const |
| Gets the password associated with the user that accesses the URI. | |
| String | GetPath () const |
| Gets the path to the resource referenced by the URI. | |
| int | GetPort () const |
| Gets the port number of the URI. | |
| String | GetQuery () const |
| Gets any query information included in the URI. | |
| String | GetScheme () const |
| Gets the scheme name of the URI. | |
| Uri | GetUri () |
| Gets the Uri instance constructed by the specified UriBuilder instance. | |
| String | GetUserName () const |
| Gets the user name associated with the user that accesses the URI. | |
| void | SetFragment (const String &value) |
| Sets the fragment portion of the URI. | |
| void | SetHost (const String &value) |
| Sets the Domain Name System (DNS) host name or IP address of a server. | |
| void | SetPassword (const String &value) |
| Sets the password associated with the user that accesses the URI. | |
| void | SetPath (const String &value) |
| Sets the path to the resource referenced by the URI. | |
| void | SetPort (int value) |
| Sets the port number of the URI. | |
| void | SetQuery (const String &value) |
| Sets any query information included in the URI. | |
| void | SetScheme (const String &value) |
| Sets the scheme name of the URI. | |
| void | SetUserName (const String &value) |
| Sets the user name associated with the user that accesses the URI. | |
| String | ToString () |
| Formats the configured components into a canonical URI string. | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Provides a custom constructor for uniform resource identifiers (URIs) and modifies URIs for the Uri class.
Modeled after .NET System.UriBuilder. Simplifies programmatic assembly, modification, and formatting of individual URI segments (scheme, host, port, path, query, fragment, credentials).
Definition at line 24 of file UriBuilder.h.
| DotNetDupe::System::UriBuilder::UriBuilder | ( | ) |
Initializes a new instance of the UriBuilder class.
Definition at line 7 of file UriBuilder.cpp.
| DotNetDupe::System::UriBuilder::UriBuilder | ( | const String & | uri | ) |
Initializes a new instance of the UriBuilder class with the specified URI.
| uri | A URI string to parse into components. |
Definition at line 8 of file UriBuilder.cpp.
| DotNetDupe::System::UriBuilder::UriBuilder | ( | const Uri & | uri | ) |
Initializes a new instance of the UriBuilder class with the specified Uri instance.
| uri | An existing Uri object to clone into mutable builder state. |
Definition at line 11 of file UriBuilder.cpp.
References GetFragment(), GetHost(), GetPort(), GetQuery(), GetScheme(), and DotNetDupe::System::Uri::ToString().
Initializes a new instance with the specified scheme and host.
| scheme | The protocol scheme. |
| host | The DNS host name or IP address. |
Definition at line 16 of file UriBuilder.cpp.
Initializes a new instance with the specified scheme, host, and port number.
| scheme | The protocol scheme. |
| host | The DNS host name or IP address. |
| port | The port number for the service. |
Definition at line 18 of file UriBuilder.cpp.
| String DotNetDupe::System::UriBuilder::GetFragment | ( | ) | const |
Gets the fragment portion of the URI.
Definition at line 36 of file UriBuilder.cpp.
Referenced by UriBuilder().
| String DotNetDupe::System::UriBuilder::GetHost | ( | ) | const |
Gets the Domain Name System (DNS) host name or IP address of a server.
Definition at line 24 of file UriBuilder.cpp.
Referenced by UriBuilder().
| String DotNetDupe::System::UriBuilder::GetPassword | ( | ) | const |
Gets the password associated with the user that accesses the URI.
Definition at line 42 of file UriBuilder.cpp.
| String DotNetDupe::System::UriBuilder::GetPath | ( | ) | const |
Gets the path to the resource referenced by the URI.
Definition at line 30 of file UriBuilder.cpp.
| int DotNetDupe::System::UriBuilder::GetPort | ( | ) | const |
Gets the port number of the URI.
Definition at line 27 of file UriBuilder.cpp.
Referenced by UriBuilder().
| String DotNetDupe::System::UriBuilder::GetQuery | ( | ) | const |
Gets any query information included in the URI.
Definition at line 33 of file UriBuilder.cpp.
Referenced by UriBuilder().
| String DotNetDupe::System::UriBuilder::GetScheme | ( | ) | const |
Gets the scheme name of the URI.
Definition at line 21 of file UriBuilder.cpp.
Referenced by UriBuilder().
| Uri DotNetDupe::System::UriBuilder::GetUri | ( | ) |
Gets the Uri instance constructed by the specified UriBuilder instance.
Construct and return Uri instance from current string representation.
Definition at line 45 of file UriBuilder.cpp.
References DotNetDupe::System::Uri::Uri(), and ToString().
| String DotNetDupe::System::UriBuilder::GetUserName | ( | ) | const |
Gets the user name associated with the user that accesses the URI.
Definition at line 39 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetFragment | ( | const String & | value | ) |
Sets the fragment portion of the URI.
| value | The fragment string. |
Definition at line 37 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetHost | ( | const String & | value | ) |
Sets the Domain Name System (DNS) host name or IP address of a server.
| value | The host name string. |
Definition at line 25 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetPassword | ( | const String & | value | ) |
Sets the password associated with the user that accesses the URI.
| value | The password credential string. |
Definition at line 43 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetPath | ( | const String & | value | ) |
Sets the path to the resource referenced by the URI.
| value | The resource path. |
Definition at line 31 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetPort | ( | int | value | ) |
Sets the port number of the URI.
| value | The port number to configure. |
Definition at line 28 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetQuery | ( | const String & | value | ) |
Sets any query information included in the URI.
| value | The query string to configure. |
Definition at line 34 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetScheme | ( | const String & | value | ) |
Sets the scheme name of the URI.
| value | The scheme name string. |
Definition at line 22 of file UriBuilder.cpp.
| void DotNetDupe::System::UriBuilder::SetUserName | ( | const String & | value | ) |
Sets the user name associated with the user that accesses the URI.
| value | The username credential string. |
Definition at line 40 of file UriBuilder.cpp.
| String DotNetDupe::System::UriBuilder::ToString | ( | ) |
Formats the configured components into a canonical URI string.
Step: Format scheme prefix.
Step: Assemble authority, path, query, and fragment parts into URI string.
Definition at line 91 of file UriBuilder.cpp.
References DotNetDupe::System::String::String(), DotNetDupe::System::AppendAuthority(), and DotNetDupe::System::AppendPathAndQuery().
Referenced by GetUri().