Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Commit 71a4150

Browse files
committed
Relese 1.0.1.3
1 parent 0822820 commit 71a4150

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

Nuget/ACBr.Net.Core.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
33
<metadata>
44
<id>ACBr.Net.Core</id>
5-
<version>1.0.1.3-rc1</version>
5+
<version>1.0.1.3</version>
66
<title>ACBr.Net.Core</title>
77
<authors>Grupo ACBr.Net</authors>
88
<owners>Grupo ACBr.Net</owners>

src/ACBr.Net.Core/Extensions/XDocumentExtensions.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,28 +83,29 @@ public static TType GetValue<TType>(this XElement element, IFormatProvider forma
8383
return ret;
8484
}
8585

86-
public static void RemoveEmptyNs(this XElement doc)
86+
public static void RemoveEmptyNs(this XContainer doc)
8787
{
8888
foreach (var node in doc.Descendants())
8989
{
90-
if (node.Name.NamespaceName != "")
91-
continue;
90+
if (!node.Name.NamespaceName.IsEmpty()) continue;
9291

9392
node.Attributes("xmlns").Remove();
9493
if (node.Parent != null)
94+
{
9595
node.Name = node.Parent.Name.Namespace + node.Name.LocalName;
96+
}
9697
}
9798
}
9899

99-
public static void AddChild(this XElement parent, params XElement[] childrens)
100+
public static void AddChild(this XContainer parent, params XElement[] childrens)
100101
{
101102
if (childrens == null || parent == null) return;
102103
if (childrens.Length < 1) return;
103104

104105
parent.Add(childrens);
105106
}
106107

107-
public static void AddAttribute(this XElement parent, params XAttribute[] attributes)
108+
public static void AddAttribute(this XContainer parent, params XAttribute[] attributes)
108109
{
109110
if (attributes == null || parent == null) return;
110111
if (attributes.Length < 1) return;
@@ -122,7 +123,7 @@ public static XElement ElementAnyNs(this XContainer source, string name)
122123
return source.Elements().SingleOrDefault(e => e.Name.LocalName == name);
123124
}
124125

125-
public static XmlDocument ToXmlDocument(this XDocument document, LoadOptions options)
126+
public static XmlDocument ToXmlDocument(this XDocument document)
126127
{
127128
using (var reader = document.CreateReader())
128129
{

0 commit comments

Comments
 (0)