CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
dns_end_point.h
1
2#pragma once
3
4#include <system/string.h>
5#include <system/shared_ptr.h>
6#include <system/object.h>
7#include <cstdint>
8
9#include <net/sockets/address_family.h>
10#include <net/end_point.h>
11
12namespace System {
13namespace Net {
14
19class ASPOSECPP_SHARED_CLASS DnsEndPoint : public System::Net::EndPoint
20{
22 typedef DnsEndPoint ThisType;
25
27 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
29 ASPOSECPP_SHARED_RTTI_INFO_DECL();
30
31public:
34 ASPOSECPP_SHARED_API String get_Host();
39 ASPOSECPP_SHARED_API int32_t get_Port();
40
44 ASPOSECPP_SHARED_API DnsEndPoint(String host, int32_t port);
49 ASPOSECPP_SHARED_API DnsEndPoint(String host, int32_t port, System::Net::Sockets::AddressFamily addressFamily);
50
54 ASPOSECPP_SHARED_API bool Equals(System::SharedPtr<Object> comparand) override;
56 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
58 ASPOSECPP_SHARED_API String ToString() const override;
59
60private:
62 String m_host;
64 int32_t m_port;
67};
68} // namespace Net
69} // namespace System
Contains information used by the application to connect to the service. Objects of this class should ...
Definition: dns_end_point.h:20
String ToString() const override
Analog of C# Object.ToString() method. Enables converting custom objects to string.
DnsEndPoint(String host, int32_t port, System::Net::Sockets::AddressFamily addressFamily)
Constructs a new instance.
System::Net::Sockets::AddressFamily get_AddressFamily() override
Returns the address family to which the current instance belongs.
String get_Host()
Returns a host name.
int32_t GetHashCode() const override
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.
bool Equals(System::SharedPtr< Object > comparand) override
Compares objects using C# Object.Equals semantics.
int32_t get_Port()
Returns the port number.
DnsEndPoint(String host, int32_t port)
Constructs a new instance.
The abstract class contains a network address. Objects of this class should only be allocated using S...
Definition: end_point.h:21
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
AddressFamily
Enumerates the address families.
Definition: address_family.h:12
Definition: db_command.h:9