Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SSPIHandleCache.cs
Go to the documentation of this file.
2
3namespace System.Net.Security;
4
5internal static class SSPIHandleCache
6{
8
9 private static int s_current = -1;
10
11 internal static void CacheCredential(System.Net.Security.SafeFreeCredentials newHandle)
12 {
13 try
14 {
16 if (safeCredentialReference != null)
17 {
18 int num = Interlocked.Increment(ref s_current) & 0x1F;
19 Interlocked.Exchange(ref s_cacheSlots[num], safeCredentialReference)?.Dispose();
20 }
21 }
22 catch (Exception ex)
23 {
25 {
26 System.Net.NetEventSource.Error(null, $"Attempted to throw: {ex}", "CacheCredential");
27 }
28 }
29 }
30}
static bool IsFatal(Exception exception)
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static readonly System.Net.Security.SafeCredentialReference[] s_cacheSlots
static void CacheCredential(System.Net.Security.SafeFreeCredentials newHandle)
static System.Net.Security.SafeCredentialReference CreateReference(System.Net.Security.SafeFreeCredentials target)
static int Exchange(ref int location1, int value)
static int Increment(ref int location)