示例#1
0
文件: Graph.cs 项目: DragonXYZ/cilpe
        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);
        }
示例#2
0
文件: Graph.cs 项目: DragonXYZ/cilpe
 public void InsertHandler(int index,EHBlock handler)
 {
     handlers.Insert(index,null);
     setHandler(index,handler);
 }
示例#3
0
文件: Graph.cs 项目: DragonXYZ/cilpe
 public void RemoveHandler(EHBlock handler)
 {
     handlers.Remove(handler);
     handler.tryBlock = null;
 }
示例#4
0
文件: Graph.cs 项目: DragonXYZ/cilpe
 public void AddHandler(EHBlock handler)
 {
     handlers.Add(null);
     setHandler(handlers.Count-1,handler);
 }