Esempio n. 1
0
 private void DefaultRemovalHook(object sender, HookedSimpleCacheEventArgs <TKey> e)
 {
     Remove(e.Target);
     if (HookedSimpleCacheState.NeedsCleanup(typeof(THookTarget)))
     {
         HookedSimpleCacheState.Cleanup(typeof(THookTarget));
     }
 }
Esempio n. 2
0
 public void OnHookPostfix(HookedSimpleCacheEventArgs <TKey> e)
 {
     HookPostfix?.Invoke(this, e);
 }
Esempio n. 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));
     }
 }
Esempio n. 4
0
 public void OnHookPrefix(HookedSimpleCacheEventArgs <TKey> e)
 {
     HookPrefix?.SafeInvoke(this, e);
 }