コード例 #1
0
ファイル: XmlDiff.cs プロジェクト: sillsdev/lift-standard
 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
ファイル: XmlDiff.cs プロジェクト: sillsdev/lift-standard
 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
ファイル: XmlDiff.cs プロジェクト: sillsdev/lift-standard
        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
ファイル: XmlDiff.cs プロジェクト: sillsdev/lift-standard
 public XmlDiff(XmlInput control, XmlInput test)
     : this(control, test, new DiffConfiguration())
 {
 }
コード例 #5
0
ファイル: XmlDiff.cs プロジェクト: sillsdev/lift-standard
 public XmlDiff(XmlInput control, XmlInput test)
     : this(control, test, new DiffConfiguration())
 {
 }
コード例 #6
0
ファイル: XmlDiff.cs プロジェクト: sillsdev/lift-standard
        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;
        }