7 [global::__DynamicallyInvokable]
14 private static readonly
object lockingObject =
new object();
16 private string m_domain;
18 private string m_userName;
24 [global::__DynamicallyInvokable]
27 [global::__DynamicallyInvokable]
31 m_environmentUserNamePermission.
Demand();
32 return InternalGetUserName();
34 [global::__DynamicallyInvokable]
39 m_userName =
string.Empty;
50 [global::__DynamicallyInvokable]
53 [global::__DynamicallyInvokable]
56 ExceptionHelper.UnmanagedPermission.Demand();
57 return InternalGetPassword();
59 [global::__DynamicallyInvokable]
62 m_password = UnsafeNclNativeMethods.SecureStringHelper.CreateSecureString(value);
73 ExceptionHelper.UnmanagedPermission.Demand();
74 return InternalGetSecurePassword().
Copy();
84 m_password = value.Copy();
91 [global::__DynamicallyInvokable]
94 [global::__DynamicallyInvokable]
98 m_environmentDomainNamePermission.
Demand();
99 return InternalGetDomain();
101 [global::__DynamicallyInvokable]
106 m_domain =
string.Empty;
116 [global::__DynamicallyInvokable]
118 : this(string.Empty, string.Empty, string.Empty)
125 [global::__DynamicallyInvokable]
127 : this(userName, password, string.Empty)
136 : this(userName, password, string.Empty)
144 [global::__DynamicallyInvokable]
164 private void InitializePart1()
166 if (m_environmentUserNamePermission ==
null)
170 if (m_environmentUserNamePermission ==
null)
179 internal string InternalGetUserName()
184 internal string InternalGetPassword()
186 return UnsafeNclNativeMethods.SecureStringHelper.CreateString(m_password);
194 internal string InternalGetDomain()
199 internal string InternalGetDomainUserName()
201 string text = InternalGetDomain();
202 if (text.Length != 0)
206 return text + InternalGetUserName();
213 [global::__DynamicallyInvokable]
224 [global::__DynamicallyInvokable]
SecureString SecurePassword
Gets or sets the password as a T:System.Security.SecureString instance.
NetworkCredential GetCredential(string host, int port, string authenticationType)
Returns an instance of the T:System.Net.NetworkCredential class for the specified host,...
EnvironmentPermissionAccess
Specifies access to environment variables.
SecureString Copy()
Creates a copy of the current secure string.
NetworkCredential(string userName, SecureString password)
Initializes a new instance of the T:System.Net.NetworkCredential class with the specified user name a...
string Password
Gets or sets the password for the user name associated with the credentials.
NetworkCredential()
Initializes a new instance of the T:System.Net.NetworkCredential class.
Represents text that should be kept confidential, such as by deleting it from computer memory when no...
Provides the interface for retrieving credentials for a host, port, and authentication type.
Provides the base authentication interface for retrieving credentials for Web client authentication.
string UserName
Gets or sets the user name associated with the credentials.
NetworkCredential(string userName, SecureString password, string domain)
Initializes a new instance of the T:System.Net.NetworkCredential class with the specified user name,...
void Demand()
Forces a T:System.Security.SecurityException at run time if all callers higher in the call stack have...
NetworkCredential(string userName, string password, string domain)
Initializes a new instance of the T:System.Net.NetworkCredential class with the specified user name,...
string Domain
Gets or sets the domain or computer name that verifies the credentials.
NetworkCredential(string userName, string password)
Initializes a new instance of the T:System.Net.NetworkCredential class with the specified user name a...
Controls access to system and user environment variables. This class cannot be inherited.
NetworkCredential GetCredential(Uri uri, string authType)
Returns an instance of the T:System.Net.NetworkCredential class for the specified Uniform Resource Id...
Provides credentials for password-based authentication schemes such as basic, digest,...
Provides an object representation of a uniform resource identifier (URI) and easy access to the parts...