using System.Runtime.Serialization;
namespace System.Net {
- public class CredentialCache : ICredentials, IEnumerable {
- static NetworkCredential empty = new NetworkCredential ("", "", "");
+ public class CredentialCache : ICredentials, IEnumerable
+#if NET_2_0
+ , ICredentialsByHost
+#endif
+ {
+ static NetworkCredential empty = new NetworkCredential (String.Empty, String.Empty, String.Empty);
Hashtable cache;
public CredentialCache ()
cache.Remove (new CredentialCacheKey (uriPrefix, authType));
}
+#if NET_2_0
+ [MonoNotSupported ("")]
+ public void Add (string host, int port, string authenticationType, NetworkCredential credential)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoNotSupported ("")]
+ public NetworkCredential GetCredential (string host, int port, string authenticationType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoNotSupported ("")]
+ public void Remove (string host, int port, string authenticationType)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
+
class CredentialCacheKey {
Uri uriPrefix;
string authType;
this.len = uriPrefix.AbsoluteUri.Length;
this.hash = uriPrefix.GetHashCode ()
- + authType.ToString ().GetHashCode ();
+ + authType.GetHashCode ();
}
public int Length {
}
}
+