|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Represents an object representation of a Uniform Resource Identifier (URI) and provides easy access to the parts of the URI. More...
#include <Uri.h>
Public Member Functions | |
| Uri (const String &uriString) | |
| Initializes a new instance of the Uri class with the specified URI string. | |
| String | GetAbsolutePath () const |
| Gets the absolute path of the URI. | |
| String | GetAbsoluteUri () const |
| Gets the absolute URI string representation. | |
| String | GetAuthority () const |
| Gets the authority (host, optional port, and optional user information). | |
| String | GetFragment () const |
| Gets the escaped URI fragment. | |
| String | GetHost () const |
| Gets the host component of this instance. | |
| String | GetOriginalString () const |
| Gets the original URI string passed to the constructor. | |
| int | GetPort () const |
| Gets the port number of this URI. | |
| String | GetQuery () const |
| Gets any query information included in the specified URI. | |
| String | GetScheme () const |
| Gets the scheme name for this URI. | |
| String | GetUserInfo () const |
| Gets the user name, password, or other user-specific information associated with the specified URI. | |
| bool | IsDefaultPort () const |
| Determines whether the port value of the URI is the default for this scheme. | |
| bool | IsFile () const |
| Determines whether the specified Uri is a file URI. | |
| bool | IsLoopback () const |
| Determines whether the specified Uri references the local host. | |
| String | ToString () const |
| Gets the canonical string representation for the specified Uri instance. | |
| 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. | |
Static Public Member Functions | |
| static String | EscapeDataString (const String &stringToEscape) |
| Converts a string to its escaped representation according to RFC 3986. | |
| static String | UnescapeDataString (const String &stringToUnescape) |
| Converts a string to its unescaped representation according to RFC 3986. | |
| 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. | |
Represents an object representation of a Uniform Resource Identifier (URI) and provides easy access to the parts of the URI.
Modeled after .NET System.Uri and adhering to the IETF RFC 3986 Uniform Resource Identifier specification. Parses scheme, authority, host, port, path, query, and fragment parts with percent-encoding and unescaping facilities.
| DotNetDupe::System::Uri::Uri | ( | const String & | uriString | ) |
Initializes a new instance of the Uri class with the specified URI string.
| uriString | A string representing the URI to parse. |
Parse components of URI string upon construction.
Definition at line 9 of file Uri.cpp.
Referenced by DotNetDupe::System::Net::Http::HttpClient::Delete(), DotNetDupe::System::Net::Http::HttpClient::Get(), DotNetDupe::System::Net::Http::HttpClient::GetByteArray(), DotNetDupe::System::Net::Http::HttpClient::GetString(), DotNetDupe::System::UriBuilder::GetUri(), DotNetDupe::System::Net::Http::HttpClient::Post(), and DotNetDupe::System::Net::Http::HttpClient::Put().
Converts a string to its escaped representation according to RFC 3986.
| stringToEscape | The string to escape. |
Step: Percent-encode non-unreserved ASCII characters per RFC 3986.
Definition at line 135 of file Uri.cpp.
References DotNetDupe::System::String::String().
| String DotNetDupe::System::Uri::GetAbsolutePath | ( | ) | const |
| String DotNetDupe::System::Uri::GetAbsoluteUri | ( | ) | const |
Gets the absolute URI string representation.
Definition at line 103 of file Uri.cpp.
Referenced by DotNetDupe::System::UriParser::GetComponents().
| String DotNetDupe::System::Uri::GetAuthority | ( | ) | const |
| String DotNetDupe::System::Uri::GetFragment | ( | ) | const |
| String DotNetDupe::System::Uri::GetHost | ( | ) | const |
| String DotNetDupe::System::Uri::GetOriginalString | ( | ) | const |
| int DotNetDupe::System::Uri::GetPort | ( | ) | const |
| String DotNetDupe::System::Uri::GetQuery | ( | ) | const |
| String DotNetDupe::System::Uri::GetScheme | ( | ) | const |
Gets the scheme name for this URI.
Definition at line 102 of file Uri.cpp.
Referenced by DotNetDupe::System::Net::Http::HttpClient::Send().
| String DotNetDupe::System::Uri::GetUserInfo | ( | ) | const |
| bool DotNetDupe::System::Uri::IsDefaultPort | ( | ) | const |
| bool DotNetDupe::System::Uri::IsFile | ( | ) | const |
Determines whether the specified Uri is a file URI.
Step: Check if scheme matches file protocol.
Definition at line 125 of file Uri.cpp.
References DotNetDupe::System::String::Equals().
| bool DotNetDupe::System::Uri::IsLoopback | ( | ) | const |
| String DotNetDupe::System::Uri::ToString | ( | ) | const |
Gets the canonical string representation for the specified Uri instance.
Return original URI string.
Definition at line 113 of file Uri.cpp.
Referenced by DotNetDupe::System::UriBuilder::UriBuilder().
Converts a string to its unescaped representation according to RFC 3986.
| stringToUnescape | The percent-encoded string to decode. |
Step: Iterate through string and unescape percent-encoded hex sequences.
Definition at line 166 of file Uri.cpp.
References DotNetDupe::System::String::String(), and DotNetDupe::System::UnescapePercentChar().