CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
web_client_protocol.h
1
2#pragma once
3#include <system/iasyncresult.h>
4#include <system/object.h>
5#include <system/shared_ptr.h>
6#include <system/string.h>
7#include <system/text/encoding.h>
8#include <system/type_info.h>
9#include <system/uri.h>
10#include <cstdint>
11#include <net/web_request.h>
12
13namespace System { namespace Web { namespace Services { namespace Protocols {
14
19class ASPOSECPP_SHARED_CLASS ABSTRACT WebClientProtocol : virtual public System::Object
20{
21public:
26 ASPOSECPP_SHARED_API System::SharedPtr<Uri> get_Uri();
29 ASPOSECPP_SHARED_API void set_Uri(System::SharedPtr<Uri> uri);
30
33 ASPOSECPP_SHARED_API String get_ConnectionGroupName();
36 ASPOSECPP_SHARED_API void set_ConnectionGroupName(String value);
42 ASPOSECPP_SHARED_API void set_Credentials(System::SharedPtr<Net::ICredentials> value);
45 ASPOSECPP_SHARED_API bool get_PreAuthenticate();
48 ASPOSECPP_SHARED_API void set_PreAuthenticate(bool value);
57 ASPOSECPP_SHARED_API int32_t get_Timeout();
60 ASPOSECPP_SHARED_API void set_Timeout(int32_t value);
63 ASPOSECPP_SHARED_API String get_Url();
66 ASPOSECPP_SHARED_API void set_Url(String value);
70 ASPOSECPP_SHARED_API bool get_UseDefaultCredentials();
74 ASPOSECPP_SHARED_API void set_UseDefaultCredentials(bool value);
76 ASPOSECPP_SHARED_API virtual void Abort();
77
78protected:
81
85 static void AddToCache(const TypeInfo& type, System::SharedPtr<Object> value);
104
105private:
107 String connectionGroupName;
111 bool preAuthenticate;
113 System::SharedPtr<Text::Encoding> requestEncoding;
115 int32_t timeout;
118 // static System::SharedPtr<Collections::Specialized::HybridDictionary> cache;
119
121 static struct __StaticConstructor__
122 {
123 __StaticConstructor__();
124 } s_constructor__;
125};
126
127}}}} // namespace System::Web::Services::Protocols
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
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
Represents a particular type and provides information about it.
Definition: type_info.h:109
This base class is used in all XML Web service client proxies that were created using ASP....
Definition: web_client_protocol.h:20
virtual System::SharedPtr< Net::WebRequest > GetWebRequest(System::SharedPtr< Uri > uri)
Creates a WebRequest-class instance for the specified URI.
String get_Url()
Gets the XML Web service URL.
bool get_UseDefaultCredentials()
Gets a value that indicates if the 'Credential' property is equal to the 'DefaultCredentials' propert...
System::SharedPtr< Text::Encoding > get_RequestEncoding()
Gets the encoding that is used to make the client requests.
static System::SharedPtr< Object > GetFromCache(const TypeInfo &type)
Gets the client protocol handler from the cache.
void set_PreAuthenticate(bool value)
Sets a value that indicates if pre-authentication is enabled.
void set_Credentials(System::SharedPtr< Net::ICredentials > value)
Sets the authentication information.
void set_RequestEncoding(System::SharedPtr< Text::Encoding > value)
Sets the encoding that is used to make the client requests.
bool get_PreAuthenticate()
Gets a value that indicates if pre-authentication is enabled.
virtual System::SharedPtr< Net::WebResponse > GetWebResponse(System::SharedPtr< Net::WebRequest > request)
Creates a WebResponse-class instance for the specified request.
virtual void Abort()
Cancels the request.
void set_Url(String value)
Sets the XML Web service URL.
System::SharedPtr< Net::ICredentials > get_Credentials()
Gets the authentication information.
static void AddToCache(const TypeInfo &type, System::SharedPtr< Object > value)
Adds the specified instance of the client protocol handler to the internal cache.
void set_ConnectionGroupName(String value)
Sets the name of the connection group.
int32_t get_Timeout()
Gets the timespan to wait before the request times out.
System::SharedPtr< Uri > uri
The XML Web service URI.
Definition: web_client_protocol.h:23
void set_Timeout(int32_t value)
Sets the timespan to wait before the request times out.
void set_UseDefaultCredentials(bool value)
Sets a value that indicates if the 'Credential' property is equal to the 'DefaultCredentials' propert...
virtual System::SharedPtr< Net::WebResponse > GetWebResponse(System::SharedPtr< Net::WebRequest > request, System::SharedPtr< IAsyncResult > result)
Creates a WebResponse-class instance for the specified request.
String get_ConnectionGroupName()
Gets the name of the connection group.
System::SharedPtr< Uri > get_Uri()
Gets the XML Web service URI.
void set_Uri(System::SharedPtr< Uri > uri)
Sets the XML Web service URI.
Definition: db_command.h:9