Exemple #1
0
 public unsafe void Add <T>(EventUnsubscriber <T> unsubscriber)
 {
     var(raiser, func) = unsubscriber.GetInnerValues();
     if (raiser == null || func == null)
     {
         return;
     }
     _lock.Enter();
     try {
         _list ??= new();
         _list.Add(new BagItem(&OnDispose, raiser, func));
     }
     finally {
         _lock.Exit();
     }
Exemple #2
0
 public bool Equals(EventUnsubscriber <T> other) => _raiser == other._raiser && _action == other._action;