Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
PureKrome committed Jun 18, 2018
1 parent 112183f commit 71763a1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/SimpleSitemap/SitemapService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public string ConvertToXmlSitemap(ICollection<SitemapNode> sitemapNodes)
{
if (sitemapNodes == null)
{
throw new ArgumentNullException("sitemapNodes");
throw new ArgumentNullException(nameof(sitemapNodes));
}

var xElement = CreateXmlSitemapIndex(sitemapNodes);

return xElement != null
? ConvertXElementToString(xElement)
return xElement != null
? ConvertXElementToString(xElement)
: null;
}

Expand All @@ -43,7 +43,7 @@ public string ConvertToXmlUrlset(ICollection<SitemapNode> sitemapNodes)
{
if (sitemapNodes == null)
{
throw new ArgumentNullException("sitemapNodes");
throw new ArgumentNullException(nameof(sitemapNodes));
}

var xElement = CreateXmlUrlSet(sitemapNodes);
Expand Down Expand Up @@ -87,7 +87,7 @@ private static XElement CreateXmlUrlSet(IEnumerable<SitemapNode> sitemapNodes)
{
if (sitemapNodes == null)
{
throw new ArgumentNullException();
throw new ArgumentNullException(nameof(sitemapNodes));
}

XNamespace xmlns = SitemapsNamespace;
Expand All @@ -113,7 +113,6 @@ private static XElement CreateXmlUrlSet(IEnumerable<SitemapNode> sitemapNodes)

if (node.Priority.HasValue)
{

var priority = new XElement(xmlns + "priority", node.Priority.Value.ToString(CultureInfo.InvariantCulture).ToLowerInvariant());
urlElement.Add(priority);
}
Expand All @@ -128,7 +127,7 @@ private static string ConvertXElementToString(XElement xElement)
{
if (xElement == null)
{
throw new ArgumentNullException("xElement");
throw new ArgumentNullException(nameof(xElement));
}

// Convert the xml to a string.
Expand Down

0 comments on commit 71763a1

Please sign in to comment.