Inheritance: XmlNodeList
示例#1
0
 internal XmlElementListListener(XmlDocument doc, XmlElementList elemList)
 {
     this.doc               = doc;
     this.elemList          = new WeakReference(elemList);
     this.nodeChangeHandler = new XmlNodeChangedEventHandler(this.OnListChanged);
     doc.NodeInserted      += this.nodeChangeHandler;
     doc.NodeRemoved       += this.nodeChangeHandler;
 }
 internal XmlElementListListener(XmlDocument doc, XmlElementList elemList)
 {
     this.doc = doc;
     this.elemList = new WeakReference(elemList);
     this.nodeChangeHandler = new XmlNodeChangedEventHandler(this.OnListChanged);
     doc.NodeInserted += this.nodeChangeHandler;
     doc.NodeRemoved += this.nodeChangeHandler;
 }
示例#3
0
        private void OnListChanged(object sender, XmlNodeChangedEventArgs args)
        {
            XmlElementList elemList = (XmlElementList)this.elemList.Target;

            if (null != elemList)
            {
                elemList.ConcurrencyCheck(args);
            }
            else
            {
                this.doc.NodeInserted -= this.nodeChangeHandler;
                this.doc.NodeRemoved  -= this.nodeChangeHandler;
            }
        }
示例#4
0
 private void OnListChanged(object sender, XmlNodeChangedEventArgs args)
 {
     lock (this)
     {
         if (this.elemList != null)
         {
             XmlElementList target = (XmlElementList)this.elemList.Target;
             if (target != null)
             {
                 target.ConcurrencyCheck(args);
             }
             else
             {
                 this.doc.NodeInserted -= this.nodeChangeHandler;
                 this.doc.NodeRemoved  -= this.nodeChangeHandler;
                 this.elemList          = null;
             }
         }
     }
 }
示例#5
0
 private void OnListChanged(object sender, XmlNodeChangedEventArgs args)
 {
     lock (this)
     {
         if (_elemList != null)
         {
             XmlElementList el = (XmlElementList)_elemList.Target;
             if (null != el)
             {
                 el.ConcurrencyCheck(args);
             }
             else
             {
                 _doc.NodeInserted -= _nodeChangeHandler;
                 _doc.NodeRemoved  -= _nodeChangeHandler;
                 _elemList          = null;
             }
         }
     }
 }
示例#6
0
 public XmlEmptyElementListEnumerator(XmlElementList list)
 {
 }
示例#7
0
        private int _changeCount; //save the total number that the dom tree has been changed ( insertion and deletion ) when this enumerator is created

        public XmlElementListEnumerator(XmlElementList list)
        {
            _list        = list;
            _curElem     = null;
            _changeCount = list.ChangeCount;
        }
示例#8
0
        int changeCount;             //save the total number that the dom tree has been changed ( insertion and deletetion ) when this enumerator is created

        public XmlElementListEnumerator(XmlElementList list)
        {
            this.list        = list;
            this.curElem     = null;
            this.changeCount = list.ChangeCount;
        }
 public XmlEmptyElementListEnumerator( XmlElementList list ) {
 }
        int             changeCount; //save the total number that the dom tree has been changed ( insertion and deletetion ) when this enumerator is created

        public XmlElementListEnumerator( XmlElementList list ) {
            this.list = list;
            this.curElem = null;
            this.changeCount = list.ChangeCount;
        }
示例#11
-1
        private int _changeCount; //save the total number that the dom tree has been changed ( insertion and deletetion ) when this enumerator is created

        public XmlElementListEnumerator(XmlElementList list)
        {
            _list = list;
            _curElem = null;
            _changeCount = list.ChangeCount;
        }