DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
UriBuilder.h
Go to the documentation of this file.
1
5
6#pragma once
7#include "Common.h"
8#include "System/Object.h"
9#include "System/String.h"
10#include "System/Uri.h"
11
12#ifdef SetPort
13#undef SetPort
14#endif
15
16namespace DotNetDupe {
17 namespace System {
18
24 class UriBuilder : public Object {
25 public:
28
32
35 DOTNETDUPE_API UriBuilder(const Uri& uri);
36
40 DOTNETDUPE_API UriBuilder(const String& scheme, const String& host);
41
46 DOTNETDUPE_API UriBuilder(const String& scheme, const String& host, int port);
47
51
54 DOTNETDUPE_API void SetScheme(const String& value);
55
59
62 DOTNETDUPE_API void SetHost(const String& value);
63
66 DOTNETDUPE_API int GetPort() const;
67
70 DOTNETDUPE_API void SetPort(int value);
71
75
78 DOTNETDUPE_API void SetPath(const String& value);
79
83
86 DOTNETDUPE_API void SetQuery(const String& value);
87
91
94 DOTNETDUPE_API void SetFragment(const String& value);
95
99
102 DOTNETDUPE_API void SetUserName(const String& value);
103
107
110 DOTNETDUPE_API void SetPassword(const String& value);
111
115
119
120 private:
121 String _uri;
122 String _scheme;
123 String _host;
124 int _port;
125 String _path;
126 String _query;
127 String _fragment;
128 String _userName;
129 String _password;
130 };
131
132 }
133}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Base object class for DotNetDupe mirroring .NET System.Object.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Provides an object representation of a Uniform Resource Identifier (URI) and easy access to its parts...
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74
void SetScheme(const String &value)
Sets the scheme name of the URI.
String GetHost() const
Gets the Domain Name System (DNS) host name or IP address of a server.
String GetFragment() const
Gets the fragment portion of the URI.
String ToString()
Formats the configured components into a canonical URI string.
int GetPort() const
Gets the port number of the URI.
void SetHost(const String &value)
Sets the Domain Name System (DNS) host name or IP address of a server.
void SetFragment(const String &value)
Sets the fragment portion of the URI.
void SetPath(const String &value)
Sets the path to the resource referenced by the URI.
String GetPath() const
Gets the path to the resource referenced by the URI.
void SetPort(int value)
Sets the port number of the URI.
String GetScheme() const
Gets the scheme name of the URI.
String GetUserName() const
Gets the user name associated with the user that accesses the URI.
void SetUserName(const String &value)
Sets the user name associated with the user that accesses the URI.
String GetQuery() const
Gets any query information included in the URI.
String GetPassword() const
Gets the password associated with the user that accesses the URI.
void SetPassword(const String &value)
Sets the password associated with the user that accesses the URI.
void SetQuery(const String &value)
Sets any query information included in the URI.
Uri GetUri()
Gets the Uri instance constructed by the specified UriBuilder instance.
UriBuilder()
Initializes a new instance of the UriBuilder class.
Definition UriBuilder.cpp:7
Represents an object representation of a Uniform Resource Identifier (URI) and provides easy access t...
Definition Uri.h:21