Example #1
0
        private void setHandler(int index, EHBlock handler)
        {
            if ((handler.Parent != null && handler.Parent != Parent) ||
                (handler.tryBlock != null))
                throw new HandlerAdditionProhibitedException(this,handler);

                EHBlock oldHandler = handlers[index] as EHBlock;

                if (oldHandler != null)
                oldHandler.tryBlock = null;

            handlers[index] = handler;

            handler.tryBlock = this;
            handler.setParent(Parent);
        }
Example #2
0
 public void InsertHandler(int index,EHBlock handler)
 {
     handlers.Insert(index,null);
     setHandler(index,handler);
 }
Example #3
0
 public void RemoveHandler(EHBlock handler)
 {
     handlers.Remove(handler);
     handler.tryBlock = null;
 }
Example #4
0
 public void AddHandler(EHBlock handler)
 {
     handlers.Add(null);
     setHandler(handlers.Count-1,handler);
 }