示例#1
0
 private void DefaultRemovalHook(object sender, HookedSimpleCacheEventArgs <TKey> e)
 {
     Remove(e.Target);
     if (HookedSimpleCacheState.NeedsCleanup(typeof(THookTarget)))
     {
         HookedSimpleCacheState.Cleanup(typeof(THookTarget));
     }
 }
示例#2
0
 public void OnHookPostfix(HookedSimpleCacheEventArgs <TKey> e)
 {
     HookPostfix?.Invoke(this, e);
 }
示例#3
0
 private void DefaultRemovalHook(HookedSimpleCache <TKey, TValue, THookTarget> sender, HookedSimpleCacheEventArgs <TKey> e)
 {
     Assert.IsNotNull(this);
     sender.Remove(e.Target);
     if (HookedSimpleCacheState.NeedsCleanup(typeof(THookTarget)))
     {
         HookedSimpleCacheState.Cleanup(typeof(THookTarget));
     }
 }
示例#4
0
 public void OnHookPrefix(HookedSimpleCacheEventArgs <TKey> e)
 {
     HookPrefix?.SafeInvoke(this, e);
 }