Files
Dec2017-Script-Dump/SonyNP/PendingAsyncResponseList.cs
2026-06-04 11:42:34 +02:00

45 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
namespace Sony.NP
{
// Token: 0x02000138 RID: 312
internal static class PendingAsyncResponseList
{
// Token: 0x06000665 RID: 1637 RVA: 0x00012024 File Offset: 0x00011024
public static void AddResponse(uint npRequestId, ResponseBase response)
{
lock (PendingAsyncResponseList.syncObject)
{
PendingAsyncResponseList.responseLookup.Add(npRequestId, response);
}
}
// Token: 0x06000666 RID: 1638 RVA: 0x0001206C File Offset: 0x0001106C
public static ResponseBase FindAndRemoveResponse(uint npRequestId)
{
ResponseBase responseBase2;
lock (PendingAsyncResponseList.syncObject)
{
ResponseBase responseBase;
if (PendingAsyncResponseList.responseLookup.TryGetValue(npRequestId, out responseBase))
{
PendingAsyncResponseList.responseLookup.Remove(npRequestId);
responseBase2 = responseBase;
}
else
{
responseBase2 = null;
}
}
return responseBase2;
}
// Token: 0x0400062D RID: 1581
private static Dictionary<uint, ResponseBase> responseLookup = new Dictionary<uint, ResponseBase>();
// Token: 0x0400062E RID: 1582
private static object syncObject = new object();
}
}