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