Example #1
0
 internal void RemoveEasyEvent(EasyEventInvoker easyEventInvoker)
 {
     if (easyEventsContainer.ContainsKey(easyEventInvoker.EasyEventToken))
     {
         easyEventsContainer.Remove(easyEventInvoker.EasyEventToken);
     }
 }
Example #2
0
        protected EasyEventToken InnerAdd(object action, object eventToken = null)
        {
            if (action == null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            EasyEventInvoker disposable = new EasyEventInvoker(action, this, eventToken);

            easyEventsContainer[disposable.EasyEventToken] = disposable;

            return(disposable.EasyEventToken);
        }
 internal EasyEventToken(EasyEventInvoker easyEventInvoker)
 {
     EventToken        = easyEventInvoker.EventToken;
     _easyEventInvoker = easyEventInvoker;
     Token             = Guid.NewGuid();
 }
 public void Dispose()
 {
     _easyEventInvoker.Dispose();
     _easyEventInvoker = null;
 }