feat(upserver): 接入认证与KV存档并完成限定钓鱼闭环
This commit is contained in:
@@ -10,6 +10,15 @@ namespace Activity
|
||||
public class ActivitySentryManager
|
||||
{
|
||||
private static Dictionary<(int, int), Type> _activitySentryTypes;
|
||||
private static object _registrationContainer;
|
||||
|
||||
private static void EnsureCurrentContainer()
|
||||
{
|
||||
if (ReferenceEquals(_registrationContainer, GContext.container)) return;
|
||||
_registrationContainer = GContext.container;
|
||||
_activitySentryTypes = null;
|
||||
TypeKeyCache.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 类型键缓存:Sentry 类型 → (EventType, EventSubType)
|
||||
@@ -21,6 +30,7 @@ namespace Activity
|
||||
{
|
||||
get
|
||||
{
|
||||
EnsureCurrentContainer();
|
||||
if (_activitySentryTypes != null) return _activitySentryTypes;
|
||||
InitActivitySentryTypes();
|
||||
|
||||
@@ -42,6 +52,7 @@ namespace Activity
|
||||
}
|
||||
public static void InitActivitySentryType(Type type)
|
||||
{
|
||||
EnsureCurrentContainer();
|
||||
_activitySentryTypes ??= new Dictionary<(int, int), Type>();
|
||||
try
|
||||
{
|
||||
@@ -82,4 +93,4 @@ namespace Activity
|
||||
return TypeKeyCache.GetValueOrDefault(sentryType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user