private void LoadXml(XmlReader xmlReader) { var result = new List<INotifyAction>(); XPathNavigator nav = new XPathDocument(xmlReader).CreateNavigator(); var manager = new XmlNamespaceManager(nav.NameTable); manager.AddNamespace("act", "urn:asc.notify.action.xsd"); XPathNodeIterator nodes = nav.Select("act:catalog/action", manager); while (nodes.MoveNext()) { result.Add( new NotifyAction( nodes.Current.GetAttribute("id", ""), nodes.Current.GetAttribute("name", ""))); } _ConstProvider = new ConstActionProvider(result.ToArray()); }
private void LoadXml(XmlReader xmlReader) { var result = new List <INotifyAction>(); XPathNavigator nav = new XPathDocument(xmlReader).CreateNavigator(); var manager = new XmlNamespaceManager(nav.NameTable); manager.AddNamespace("act", "urn:asc.notify.action.xsd"); XPathNodeIterator nodes = nav.Select("act:catalog/action", manager); while (nodes.MoveNext()) { result.Add( new NotifyAction( nodes.Current.GetAttribute("id", ""), nodes.Current.GetAttribute("name", ""))); } _ConstProvider = new ConstActionProvider(result.ToArray()); }