CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
web_proxy.h
1
2#pragma once
3#include <cstdint>
4#include <system/array.h>
5#include <system/collections/list.h>
6#include <system/runtime/serialization/serialization_info.h>
7#include <system/runtime/serialization/streaming_context.h>
8#include <system/string.h>
9#include <system/text/regularexpressions/regex.h>
10
11#include <net/ip_address.h>
12#include <net/iweb_proxy.h>
13
14namespace System { namespace Net {
15
21{
22public:
34 void set_BypassProxyOnLocal(bool value);
52 void set_UseDefaultCredentials(bool value);
53
62 WebProxy(System::SharedPtr<Uri> Address, bool BypassOnLocal);
67 WebProxy(System::SharedPtr<Uri> Address, bool BypassOnLocal, System::ArrayPtr<String> BypassList);
73 WebProxy(System::SharedPtr<Uri> Address, bool BypassOnLocal, System::ArrayPtr<String> BypassList,
78 WebProxy(String Host, int32_t Port);
81 WebProxy(String Address);
85 WebProxy(String Address, bool BypassOnLocal);
90 WebProxy(String Address, bool BypassOnLocal, System::ArrayPtr<String> BypassList);
96 WebProxy(String Address, bool BypassOnLocal, System::ArrayPtr<String> BypassList,
98
110
111private:
117 System::SharedPtr<Uri> pr_Address;
119 bool pr_BypassProxyOnLocal;
121 System::SharedPtr<ICredentials> pr_Credentials;
122
126 static System::SharedPtr<Uri> CreateProxyUri(String address);
129 void UpdateRegExList(bool canThrow);
134 bool IsMatchInBypassList(System::SharedPtr<Uri> input);
138 bool IsLocal(System::SharedPtr<Uri> host);
142 static bool IsAddressLocal(System::SharedPtr<IPAddress> ipAddress);
143};
144
145}} // namespace System::Net
This interface used for implementation of proxy access to the WebRequest class. Objects of this class...
Definition: iweb_proxy.h:17
Represents an http web-proxy server. Objects of this class should only be allocated using System::Mak...
Definition: web_proxy.h:21
WebProxy(String Address)
Constructs a new instance.
WebProxy(System::SharedPtr< Uri > Address, bool BypassOnLocal)
Constructs a new instance.
WebProxy()
Constructs a new instance.
bool IsBypassed(System::SharedPtr< Uri > host)
Checks if the proxy server is not used for the specified URI.
System::SharedPtr< ICredentials > get_Credentials()
Gets the credentials that are sent to the proxy server for authentication.
System::ArrayPtr< String > get_BypassList()
Gets the list of addresses that do not use the proxy server.
System::SharedPtr< Uri > get_Address()
Gets the address of the current proxy server.
bool get_UseDefaultCredentials()
Gets a value that indicates if the default credentials must be sent with requests.
WebProxy(String Address, bool BypassOnLocal, System::ArrayPtr< String > BypassList)
Constructs a new instance.
WebProxy(System::SharedPtr< Uri > Address, bool BypassOnLocal, System::ArrayPtr< String > BypassList, System::SharedPtr< ICredentials > Credentials)
Constructs a new instance.
void set_BypassProxyOnLocal(bool value)
Sets a value that indicates if the proxy server must be used for local addresses.
System::SharedPtr< Uri > GetProxy(System::SharedPtr< Uri > destination)
Returns the proxied URI for a web request.
void set_BypassList(System::ArrayPtr< String > value)
Sets the list of addresses that do not use the proxy server.
void set_Address(System::SharedPtr< Uri > value)
Sets the address of the current proxy server.
WebProxy(String Address, bool BypassOnLocal, System::ArrayPtr< String > BypassList, System::SharedPtr< ICredentials > Credentials)
Constructs a new instance.
WebProxy(System::SharedPtr< Uri > Address, bool BypassOnLocal, System::ArrayPtr< String > BypassList)
Constructs a new instance.
bool get_BypassProxyOnLocal()
Gets a value that indicates if the proxy server must be used for local addresses.
WebProxy(String Host, int32_t Port)
Constructs a new instance.
WebProxy(String Address, bool BypassOnLocal)
Constructs a new instance.
void set_Credentials(System::SharedPtr< ICredentials > value)
Sets the credentials that are sent to the proxy server for authentication.
WebProxy(System::SharedPtr< Uri > Address)
Constructs a new instance.
static System::SharedPtr< WebProxy > GetDefaultProxy()
Returns the proxy that uses the non-dynamic settings of the Internet Explorer.
void set_UseDefaultCredentials(bool value)
Sets a value that indicates if the default credentials must be sent with requests.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Definition: db_command.h:9