// Token: 0x06007735 RID: 30517 RVA: 0x00221058 File Offset: 0x0021F258 private void HookNotifications() { if (base.IsDynamic && this.ContextNode != null) { XmlDocument xmlDocument = this.DocumentFor(this.ContextNode); if (xmlDocument != null) { XmlNodeChangedEventManager.AddHandler(xmlDocument, new EventHandler <XmlNodeChangedEventArgs>(this.OnXmlNodeChanged)); } } }
// 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); } } } }