Exemplo n.º 1
0
 internal void RemoveEasyEvent(EasyEventInvoker easyEventInvoker)
 {
     if (easyEventsContainer.ContainsKey(easyEventInvoker.EasyEventToken))
     {
         easyEventsContainer.Remove(easyEventInvoker.EasyEventToken);
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 internal EasyEventToken(EasyEventInvoker easyEventInvoker)
 {
     EventToken        = easyEventInvoker.EventToken;
     _easyEventInvoker = easyEventInvoker;
     Token             = Guid.NewGuid();
 }
Exemplo n.º 4
0
 public void Dispose()
 {
     _easyEventInvoker.Dispose();
     _easyEventInvoker = null;
 }