Skip to content

Commit

Permalink
Remove non required dependencies from .NET Standard version
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMagnan committed May 30, 2020
1 parent 8591f1d commit ee9b6d9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<PackageId>HtmlAgilityPack</PackageId>
<Version>1.11.1</Version>
<Version>1.11.24</Version>
<Authors>ZZZ Projects Inc.</Authors>
<Company>ZZZ Projects Inc.</Company>
<Product>Html Agility Pack</Product>
Expand All @@ -35,9 +35,6 @@
<Import Project="..\HtmlAgilityPack.Shared\HtmlAgilityPack.Shared.projitems" Label="Shared" />

<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.1" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
<PackageReference Include="System.Xml.XPath" Version="4.3.0" />
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="4.3.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<AssemblyName>HtmlAgilityPack</AssemblyName>
<RootNamespace>HtmlAgilityPack</RootNamespace>
<PackageId>HtmlAgilityPack</PackageId>
<Version>1.11.1</Version>
<Version>1.11.24</Version>
<Authors>ZZZ Projects Inc.</Authors>
<Company>ZZZ Projects Inc.</Company>
<Product>Html Agility Pack</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>HtmlAgilityPack.snk</AssemblyOriginatorKeyFile>
<AssemblyName>HtmlAgilityPack</AssemblyName>
<Version>1.11.1</Version>
<Version>1.11.24</Version>
<Copyright>Copyright © ZZZ Projects Inc.</Copyright>
<Company>ZZZ Projects Inc.</Company>
<Product>Html Agility Pack</Product>
Expand All @@ -33,9 +33,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.1" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
<PackageReference Include="System.Xml.XPath" Version="4.3.0" />
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="4.3.0" />
</ItemGroup>

Expand Down
20 changes: 18 additions & 2 deletions src/HtmlAgilityPack.Shared/HtmlNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,9 +1307,25 @@ public IEnumerable<HtmlAttribute> GetAttributes(params string[] attributeNames)
public string GetAttributeValue(string name, string def)
{
#if METRO || NETSTANDARD1_3 || NETSTANDARD1_6
return GetAttributeValue(name, def);
if (name == null)
{
throw new ArgumentNullException("name");
}

if (!HasAttributes)
{
return def;
}

HtmlAttribute att = Attributes[name];
if (att == null)
{
return def;
}

return att.Value;
#else
return GetAttributeValue<string>(name, def);
return GetAttributeValue<string>(name, def);
#endif
}

Expand Down

0 comments on commit ee9b6d9

Please sign in to comment.