Beispiel #1
0
 ///<summary>
 /// Constructor.
 ///</summary>
 public XmlDiff(XmlInput control, XmlInput test,
                DiffConfiguration diffConfiguration)
 {
     _diffConfiguration = diffConfiguration;
     _controlReader     = CreateXmlReader(control);
     if (control.Equals(test))
     {
         _testReader = _controlReader;
     }
     else
     {
         _testReader = CreateXmlReader(test);
     }
 }
Beispiel #2
0
		///<summary>
		/// Constructor.
		///</summary>
		public XmlDiff(XmlInput control, XmlInput test,
					   DiffConfiguration diffConfiguration)
		{
			_diffConfiguration = diffConfiguration;
			_controlReader = CreateXmlReader(control);
			if (control.Equals(test))
			{
				_testReader = _controlReader;
			}
			else
			{
				_testReader = CreateXmlReader(test);
			}
		}
Beispiel #3
0
        private XmlReader CreateXmlReader(XmlInput forInput)
        {
            XmlReader xmlReader = forInput.CreateXmlReader();

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

            if (_diffConfiguration.UseValidatingParser)
            {
#pragma warning disable 612,618
                XmlValidatingReader validatingReader = new XmlValidatingReader(xmlReader);
#pragma warning restore 612,618
                return(validatingReader);
            }

            return(xmlReader);
        }
Beispiel #4
0
		private XmlReader CreateXmlReader(XmlInput forInput)
		{
			XmlReader xmlReader = forInput.CreateXmlReader();

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

			if (_diffConfiguration.UseValidatingParser)
			{
#pragma warning disable 612,618
				XmlValidatingReader validatingReader = new XmlValidatingReader(xmlReader);
#pragma warning restore 612,618
				return validatingReader;
			}

			return xmlReader;
		}
Beispiel #5
0
 ///<summary>
 /// Constructor.
 ///</summary>
 public XmlDiff(XmlInput control, XmlInput test)
     : this(control, test, new DiffConfiguration())
 {
 }
Beispiel #6
0
		///<summary>
		/// Constructor.
		///</summary>
		public XmlDiff(XmlInput control, XmlInput test)
			: this(control, test, new DiffConfiguration())
		{
		}