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