// Author: Duncan Mak (duncan@ximian.com)
//
// (C) Ximian, Inc.
-//
-
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
namespace System.Net
{
public class NetworkCredential : ICredentials
+#if NET_2_0 && !NET_2_1
+ , ICredentialsByHost
+#endif
{
// Fields
string userName;
// Constructors
public NetworkCredential ()
- : base ()
{
}
// Properties
- public string Domain
- {
- get { return domain; }
+ public string Domain {
+ get { return domain ?? String.Empty; }
set { domain = value; }
}
- public string UserName
- {
- get { return userName; }
+ public string UserName {
+ get { return userName ?? String.Empty; }
set { userName = value; }
}
- public string Password
- {
- get { return password; }
+ public string Password {
+ get { return password ?? String.Empty; }
set { password = value; }
}
public NetworkCredential GetCredential (Uri uri, string authType)
{
return this;
- }
+ }
+
+#if NET_2_0 && !NET_2_1
+ public NetworkCredential GetCredential (string host, int port, string authenticationType)
+ {
+ return this;
+ }
+#endif
}
}