예제 #1
0
 public XmlDiff(XmlInput control, XmlInput test,
                DiffConfiguration diffConfiguration)
 {
     _diffConfiguration = diffConfiguration;
     _controlReader     = CreateXmlReader(control);
     if (control.Equals(test))
     {
         _testReader = _controlReader;
     }
     else
     {
         _testReader = CreateXmlReader(test);
     }
 }
예제 #2
0
 public XmlDiff(XmlInput control, XmlInput test,
     DiffConfiguration diffConfiguration)
 {
     _diffConfiguration = diffConfiguration;
     _controlReader = CreateXmlReader(control);
     if (control.Equals(test))
     {
         _testReader = _controlReader;
     }
     else
     {
         _testReader = CreateXmlReader(test);
     }
 }
예제 #3
0
        private XmlReader CreateXmlReader(XmlInput forInput)
        {
            XmlReader xmlReader = forInput.CreateXmlReader();

            if (xmlReader is XmlTextReader)
            {
                ((XmlTextReader)xmlReader).WhitespaceHandling = _diffConfiguration.WhitespaceHandling;
            }

            if (_diffConfiguration.UseValidatingParser)
            {
                XmlValidatingReader validatingReader = new XmlValidatingReader(xmlReader);
                return(validatingReader);
            }

            return(xmlReader);
        }
예제 #4
0
 public XmlDiff(XmlInput control, XmlInput test)
     : this(control, test, new DiffConfiguration())
 {
 }
예제 #5
0
 public XmlDiff(XmlInput control, XmlInput test)
     : this(control, test, new DiffConfiguration())
 {
 }
예제 #6
0
        private XmlReader CreateXmlReader(XmlInput forInput)
        {
            XmlReader xmlReader = forInput.CreateXmlReader();

            if (xmlReader is XmlTextReader)
            {
                ((XmlTextReader)xmlReader).WhitespaceHandling = _diffConfiguration.WhitespaceHandling;
            }

            if (_diffConfiguration.UseValidatingParser)
            {
                XmlValidatingReader validatingReader = new XmlValidatingReader(xmlReader);
                return validatingReader;
            }

            return xmlReader;
        }