Skip to content

Commit

Permalink
Remove Common from Mvp.Xml namespaces
Browse files Browse the repository at this point in the history
No need for the additional Common everywhere.
  • Loading branch information
kzu committed Mar 24, 2023
1 parent 85f988a commit 07a01c9
Show file tree
Hide file tree
Showing 59 changed files with 68 additions and 86 deletions.
2 changes: 1 addition & 1 deletion src/Mvp.Xml.Tests/Common/EmptyXPathNodeIteratorTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;
using Xunit;

namespace Mvp.Xml.Tests;
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml.Tests/Common/IndexingXPathNavigatorTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Diagnostics;
using System.Xml.XPath;
using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;
using Xunit;

namespace Mvp.Xml.Tests;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.IO;
using System.Xml.XPath;
using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;
using Xunit;

namespace Mvp.Xml.Tests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;
using Xunit;

namespace Mvp.Xml.Tests.SubtreeeXPathNavigatorTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests.UpperLowerTests;
Expand Down
3 changes: 1 addition & 2 deletions src/Mvp.Xml.Tests/Common/XPathCacheTests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using System.Xml;
using System.Xml.XPath;
using Mvp.Xml.Common;
using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;
using Xunit;

namespace Mvp.Xml.Tests;
Expand Down
3 changes: 1 addition & 2 deletions src/Mvp.Xml.Tests/Common/XPathCacheUsability.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using System;
using System.Xml;
using System.Xml.XPath;

using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;

namespace Mvp.Xml.Tests;

Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml.Tests/Common/XPathDocumentWriterFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using System.Xml;
using System.Xml.XPath;
using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;
using Xunit;

namespace Mvp.Xml.Tests.Common;
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml.Tests/Common/XPathIteratorReaderTests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using System.Xml;
using System.Xml.XPath;
using Mvp.Xml.Common.XPath;
using Mvp.Xml.XPath;
using Xunit;

namespace Mvp.Xml.Tests.XPathIteratorReaderTests;
Expand Down
1 change: 0 additions & 1 deletion src/Mvp.Xml.Tests/Common/XhtmlWriterTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.IO;
using System.Xml;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests.Common;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Xml;
using System.Xml.XPath;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests.XmlBaseAwareXmlReaderTests;
Expand Down
1 change: 0 additions & 1 deletion src/Mvp.Xml.Tests/Common/XmlFragmentReaderTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Xml;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests.Common;
Expand Down
1 change: 0 additions & 1 deletion src/Mvp.Xml.Tests/Common/XmlFragments/Tests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.IO;
using System.Xml;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests.XmlFragments;
Expand Down
1 change: 0 additions & 1 deletion src/Mvp.Xml.Tests/Common/XmlNodeFactoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Xml;
using System.Xml.Serialization;
using System.Xml.XPath;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests;
Expand Down
1 change: 0 additions & 1 deletion src/Mvp.Xml.Tests/Common/XmlNodeListFactoryTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Xml;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests;
Expand Down
1 change: 0 additions & 1 deletion src/Mvp.Xml.Tests/Common/XmlNormalizingReaderFixture.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests.Common;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Mvp.Xml.Common.Serialization;
using Xunit;

namespace Mvp.Xml.Serialization.Tests;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Xml.Serialization;
using Mvp.Xml.Common.Serialization;
using Xunit;

namespace Mvp.Xml.Serialization.Tests;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Xml.Serialization;
using Mvp.Xml.Common.Serialization;
using Xunit;

namespace Mvp.Xml.Serialization.Tests;
Expand Down
1 change: 0 additions & 1 deletion src/Mvp.Xml.Tests/Common/XmlWrappingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.Xml;
using System.Xml.Xsl;
using Mvp.Xml.Common;
using Xunit;

namespace Mvp.Xml.Tests;
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/Guard.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Globalization;

namespace Mvp.Xml.Common;
namespace Mvp.Xml;

/// <summary>
/// Helper class with guard checks.
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/QName.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Mvp.Xml.Common;
namespace Mvp.Xml;

/// <summary>
/// XML Qualified Name (<a href="http://www.w3.org/TR/REC-xml-names/#dt-qualname">http://www.w3.org/TR/REC-xml-names/#dt-qualname</a>).
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/Serialization/CacheKeyFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Text;
using System.Xml.Serialization;

namespace Mvp.Xml.Common.Serialization;
namespace Mvp.Xml.Serialization;

/// <summary>
/// The CacheKeyFactory extracts a unique signature
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/Serialization/SignatureExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Text;
using System.Xml.Serialization;

namespace Mvp.Xml.Common.Serialization;
namespace Mvp.Xml.Serialization;

// TODO:
// I could test if the creating the hashvalue for the
Expand Down
45 changes: 22 additions & 23 deletions src/Mvp.Xml/Common/Serialization/StringSorter.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
using System.Collections.Generic;

namespace Mvp.Xml.Common.Serialization
namespace Mvp.Xml.Serialization;

/// <summary>
/// Helper class to simpify sorting
/// strings (Not really necessary in Whidbey).
/// </summary>
public class StringSorter
{
readonly List<string> list = new();

/// <summary>
/// Helper class to simpify sorting
/// strings (Not really necessary in Whidbey).
/// Add a string to sort
/// </summary>
public class StringSorter
{
readonly List<string> list = new();

/// <summary>
/// Add a string to sort
/// </summary>
/// <param name="s"></param>
public void AddString(string s) => list.Add(s);
/// <param name="s"></param>
public void AddString(string s) => list.Add(s);

/// <summary>
/// Sort the strings that were added by calling
/// <see cref="AddString"/>
/// </summary>
/// <returns>A sorted string array.</returns>
public string[] GetOrderedArray()
{
list.Sort();
return list.ToArray();
}
/// <summary>
/// Sort the strings that were added by calling
/// <see cref="AddString"/>
/// </summary>
/// <returns>A sorted string array.</returns>
public string[] GetOrderedArray()
{
list.Sort();
return list.ToArray();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Xml.Serialization;

namespace Mvp.Xml.Common.Serialization;
namespace Mvp.Xml.Serialization;

/// <summary>
/// Helpers to create a normalized thumbprint
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/Serialization/XmlSerializerCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Mvp.Xml.Common.Serialization;
namespace Mvp.Xml.Serialization;

/// <summary>
/// Delegete type for events to raise from the
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/DynamicContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Xml.XPath;
using System.Xml.Xsl;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// Provides the evaluation context for fast execution and custom
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/EmptyXPathNodeIterator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// Empty <see cref="XPathNodeIterator"/>, used to represent empty
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/IHasXPathNavigator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// Enables a class to return an <see cref="XPathNavigator"/> from the current context or position.
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/IndexingXPathNavigator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Xml.XPath;
using System.Xml.Xsl;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// <see cref="IndexingXPathNavigator"/> enables lazy or eager indexing of any XML store
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/SingletonXPathNodeIterator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// <see cref="XPathNodeIterator"/> over a single node. Can be used to return a single
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/SubtreeeXPathNavigator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Xml;
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// Allows to navigate a subtree of an <see cref="IXPathNavigable"/> source,
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/XPathCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Xml;
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// Implements a cache of XPath queries, for faster execution.
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/XPathDocumentWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Xml;
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// <see cref="XmlWriter"/> that can produce an
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/XPathIteratorReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Xml.Serialization;
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// Provides an <see cref="XmlReader"/> over an
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/XPathNavigatorIterator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.XPath;

namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// An <see cref="XPathNodeIterator"/> that allows
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XPath/XPathVariable.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Mvp.Xml.Common.XPath;
namespace Mvp.Xml.XPath;

/// <summary>
/// Represents a variable to use in dynamic XPath expression
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XhtmlWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Globalization;
using System.Xml;

namespace Mvp.Xml.Common;
namespace Mvp.Xml;

/// <summary>
/// XHTML writer. Writes XML using the HTML compatibility guidelines defined in the XHTML 1.0 specification.
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XmlBaseAwareXmlReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.IO;
using System.Xml;

namespace Mvp.Xml.Common;
namespace Mvp.Xml;

/// <summary>
/// Custom <see cref="XmlReader"/> supporting <a href="http://www.w3.org/TR/xmlbase/">XML Base</a>.
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XmlFirstLowerWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Text;
using System.Xml;

namespace Mvp.Xml.Common;
namespace Mvp.Xml;

/// <summary>
/// Implements an <see cref="XmlWriter"/> that turns the
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XmlFirstUpperReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO;
using System.Xml;

namespace Mvp.Xml.Common;
namespace Mvp.Xml;

/// <summary>
/// Implements an <see cref="XmlTextReader"/> that turns the
Expand Down
2 changes: 1 addition & 1 deletion src/Mvp.Xml/Common/XmlFragmentReader.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Xml;

namespace Mvp.Xml.Common;
namespace Mvp.Xml;

/// <summary>
/// Wraps an <see cref="XmlReader"/> which was created to read
Expand Down
Loading

0 comments on commit 07a01c9

Please sign in to comment.