Пример #1
0
        public void SelectUpdateTest()
        {
            var success = _testConfigXpathNavigatorMerge.SelectUpdate(CreatNavigationDictionary("/configuration/configSections/section[@name='unity']/@type"),
                                                                      "Hello, this is a wrong type");

            Assert.IsTrue(success);
        }
Пример #2
0
        private void UpdateLogoutput()
        {
            if (null == _sourceXmlDoc ||
                string.IsNullOrEmpty(_sourceXmlDoc.OuterXml))
            {
                return;
            }
            var targetlogfile = txtLogfileName.Text.Trim();

            if (string.IsNullOrWhiteSpace(targetlogfile))
            {
                return;
            }

            var xpathNavigatorMerger = new XpathNavigatorMerge(_sourceXmlDoc);
            var navDictionary        = new Dictionary <string, string>();

            navDictionary.Add(LogoutputXpath, string.Empty);
            xpathNavigatorMerger.SelectUpdate(navDictionary, targetlogfile);
            _sourceXmlDoc.LoadXml(xpathNavigatorMerger.MergedXmlDoc.OuterXml);
        }