示例#1
0
 void ProcessExpire()
 {
     if (!_processExpire)
     {
         return;
     }
     if (OnExpire != null)
     {
         var args = new ExpireEventArgs <T>(_oldItem, this.Item);
         if (Async)
         {
             Task.Run(() => OnExpire(this, args));
         }
         else
         {
             OnExpire(this, args);
         }
     }
     _processExpire = false;
     _oldItem       = default(T);
 }
示例#2
0
 private void Val_OnExpire(object sender, ExpireEventArgs <TValue> e)
 {
     OnExpire(sender, e);
 }