113 if (
cache._cache !=
null)
115 if (
cache._cacheForHosts ==
null)
121 if (
cache._cacheForHosts ==
null)
183 NetEventSource.
Info(
this,
$"Adding key:[{credentialKey}], cred:[{cred.Domain}],[{cred.UserName}]",
"Add");
202 if (
host.Length == 0)
218 NetEventSource.
Info(
this,
$"Adding key:[{credentialHostKey}], cred:[{credential.Domain}],[{credential.UserName}]",
"Add");
237 NetEventSource.
Info(
this,
"Short-circuiting because the dictionary is null.",
"Remove");
260 NetEventSource.
Info(
this,
"Short-circuiting because the dictionary is null.",
"Remove");
287 NetEventSource.
Info(
this,
"CredentialCache::GetCredential short-circuiting because the dictionary is null.",
"GetCredential");
323 if (
host.Length == 0)
335 NetEventSource.
Info(
this,
"CredentialCache::GetCredential short-circuiting because the dictionary is null.",
"GetCredential");
Enumerator GetEnumerator()
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
static bool MoveNext< TKey, TValue >(ref Dictionary< TKey, TValue >.ValueCollection.Enumerator enumerator, out TValue current)
static void Reset< TEnumerator >(ref TEnumerator enumerator)
Dictionary< CredentialHostKey, NetworkCredential >.ValueCollection.Enumerator _enumerator
override bool MoveNext(out NetworkCredential current)
DoubleTableCredentialEnumerator(CredentialCache cache)
SingleTableCredentialEnumerator(CredentialCache cache, Dictionary< TKey, NetworkCredential > table)
override bool MoveNext(out NetworkCredential current)
Dictionary< TKey, NetworkCredential >.ValueCollection.Enumerator _enumerator
NetworkCredential _current
static CredentialEnumerator Create(CredentialCache cache)
readonly CredentialCache _cache
CredentialEnumerator(CredentialCache cache)
virtual bool MoveNext(out NetworkCredential current)
Dictionary< CredentialHostKey, NetworkCredential > _cacheForHosts
NetworkCredential? GetCredential(Uri uriPrefix, string authType)
Dictionary< CredentialKey, NetworkCredential > _cache
void Remove(Uri? uriPrefix, string? authType)
NetworkCredential? GetCredential(string host, int port, string authenticationType)
void Remove(string? host, int port, string? authenticationType)
static ICredentials DefaultCredentials
static NetworkCredential DefaultNetworkCredentials
void Add(Uri uriPrefix, string authType, NetworkCredential cred)
IEnumerator GetEnumerator()
void Add(string host, int port, string authenticationType, NetworkCredential credential)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static readonly SystemNetworkCredential s_defaultCredential
static string Format(string resourceFormat, object p1)
static string net_nodefaultcreds
static string InvalidOperation_EnumFailedVersion
static string net_emptystringcall
static string InvalidOperation_EnumOpCantHappen