CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
network_credential.h
1
2#pragma once
3
4#include <net/icredentials_by_host.h>
5#include <net/icredentials.h>
6
7namespace System {
8namespace Net {
9
14class ASPOSECPP_SHARED_CLASS NetworkCredential : public System::Net::ICredentials, public System::Net::ICredentialsByHost, public virtual System::Object
15{
24
26 typedef ::System::BaseTypesInfo<BaseType, BaseType1, BaseType2> ThisTypeBaseTypesInfo;
28 ASPOSECPP_SHARED_RTTI_INFO_DECL();
29
30public:
33 ASPOSECPP_SHARED_API String get_UserName();
36 ASPOSECPP_SHARED_API void set_UserName(String value);
39 ASPOSECPP_SHARED_API String get_Password();
42 ASPOSECPP_SHARED_API void set_Password(String value);
45 ASPOSECPP_SHARED_API String get_Domain();
48 ASPOSECPP_SHARED_API void set_Domain(String value);
49
51 ASPOSECPP_SHARED_API NetworkCredential();
55 ASPOSECPP_SHARED_API NetworkCredential(String userName, String password);
60 ASPOSECPP_SHARED_API NetworkCredential(String userName, String password, String domain);
61
65 ASPOSECPP_SHARED_API System::SharedPtr<NetworkCredential> GetCredential(System::SharedPtr<Uri> uri, String authenticationType) override;
70 ASPOSECPP_SHARED_API System::SharedPtr<NetworkCredential> GetCredential(String host, int32_t port, String authenticationType) override;
71
72private:
74 System::String m_domain;
76 System::String m_userName;
78 System::String m_password;
79};
80} // namespace Net
81} // namespace System
Provides the authentication interface for retrieving credentials for a host, port,...
Definition: icredentials_by_host.h:19
Provides the authentication interface. Objects of this class should only be allocated using System::M...
Definition: icredentials.h:18
Provides credentials for the password-based authentication schemes. Objects of this class should only...
Definition: network_credential.h:15
void set_Password(String value)
Sets the password.
void set_Domain(String value)
Sets the domain that verifies the credentials.
NetworkCredential(String userName, String password)
Constructs a new instance.
NetworkCredential(String userName, String password, String domain)
Constructs a new instance.
System::SharedPtr< NetworkCredential > GetCredential(System::SharedPtr< Uri > uri, String authenticationType) override
Returns credentials for the specified URI and authentication type.
NetworkCredential()
Constructs a new instance.
String get_Password()
Gets the password.
String get_UserName()
Gets the username.
System::SharedPtr< NetworkCredential > GetCredential(String host, int32_t port, String authenticationType) override
Returns credentials for the specified host name, port, and authentication type.
void set_UserName(String value)
Sets the username.
String get_Domain()
Gets the domain that verifies the credentials.
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
Definition: db_command.h:9