Esempio n. 1
0
            public ListenerImplementation(Stream <T> stream, Action <Transaction, T> action, Node <T> .Target target)
            {
                this.stream = stream;
                this.action = action;

                this.weakListener = new WeakListener(stream?.Node, target);
            }
 public CopiedOptionItem(IOptionItem delegateItem, IOptionGroup group)
 {
     this.delegateItem  = delegateItem;
     dictionaryOverride = new Dictionary <string, object>();
     lookup             = delegateItem;
     this.enabled       = this.initialEnabled = delegateItem.Enabled;
     this.value         = this.initialValue = delegateItem.Value;
     this.group         = group;
     listener           = new WeakListener(this, delegateItem);
 }
 public virtual void Dispose()
 {
     GetOptionHandler().Dispose(delegateItem, this);
     if (delegateItem != null)
     {
         if (listener != null)
         {
             listener.Disconnect(delegateItem);
             listener = null;
         }
         delegateItem       = null;
         lookup             = null;
         dictionaryOverride = null;
         group = null;
     }
 }