// Token: 0x06007736 RID: 30518 RVA: 0x00221098 File Offset: 0x0021F298
 private void UnHookNotifications()
 {
     if (base.IsDynamic && this.ContextNode != null)
     {
         XmlDocument xmlDocument = this.DocumentFor(this.ContextNode);
         if (xmlDocument != null)
         {
             XmlNodeChangedEventManager.RemoveHandler(xmlDocument, new EventHandler <XmlNodeChangedEventArgs>(this.OnXmlNodeChanged));
         }
     }
 }
예제 #2
0
 // We hook up only one set of event listeners per document and propagate
 // events to our worker instances.  This is a perf savings because we use
 // a doubly-linked to add/remove workers, whereas delegate add/remove
 // is linear and doesn't scale well for high number of binding workers.
 private void HookNotifications()
 {
     //Hook Xml Node Change Notifications for one way
     //and two way binding
     if (IsDynamic)
     {
         // Check the node on which we would run XPath queries.
         // We can only hook if there is a node.
         if (ContextNode != null)
         {
             XmlDocument doc = DocumentFor(ContextNode);
             if (doc != null)
             {
                 XmlNodeChangedEventManager.AddHandler(doc, OnXmlNodeChanged);
             }
         }
     }
 }
예제 #3
0
 // see comment on HookNotifications()
 private void UnHookNotifications()
 {
     //Hook Xml Node Change Notifications for one way
     //and two way binding
     if (IsDynamic)
     {
         //this worker might not be hooked, either because
         //the query is empty or because of an invalid query.
         //Only unhook if we were hooked in the first place.
         if (ContextNode != null)
         {
             XmlDocument doc = DocumentFor(ContextNode);
             if (doc != null)
             {
                 XmlNodeChangedEventManager.RemoveHandler(doc, OnXmlNodeChanged);
             }
         }
     }
 }