Skip to content

Commit 0a920e8

Browse files
authored
fix: Polyfill updated as a conditional dependency (#163)
1 parent 126c860 commit 0a920e8

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
1717
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1818
<PackageVersion Include="NetEvolve.Extensions.XUnit" Version="2.2.12" />
19-
<PackageVersion Include="Polyfill" Version="5.5.2" />
19+
<PackageVersion Include="Polyfill" Version="5.4.0" />
2020
<PackageVersion Include="xunit" Version="2.8.1" />
2121
</ItemGroup>
2222

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@ Throws an `ArgumentNullException` if the argument is `null`. Inplace replacement
3232
### `Argument.ThrowIfNullOrEmpty(string?, string?)`
3333
Throws an `ArgumentNullException` if the argument is `null` or throws an `ArgumentException` if the argument is empty. Inplace replacement for [`ArgumentException.ThrowIfNullOrEmpty(string, string)`](https://learn.microsoft.com/en-us/dotnet/api/system.argumentexception.throwifnullorempty), which was introduced with **.NET 7**.
3434

35+
### `Argument.ThrowIfNullOrEmpty<T>(IEnumerable<T>?, string?)` (Individuall extension)
36+
Throws an `ArgumentNullException` if the argument is `null` or throws an `ArgumentException` if the argument is empty.
37+
3538
### `Argument.ThrowIfNullOrWhiteSpace(string?, string?)`
3639
Throws an `ArgumentNullException` if the argument is `null` or throws an `ArgumentException` if the argument is empty or contains only white-space characters. Inplace replacement for [`ArgumentException.ThrowIfNullOrWhiteSpace(string, string)`](https://learn.microsoft.com/en-us/dotnet/api/system.argumentexception.throwifnullorwhitespace), which was introduced with **.NET 8**.

src/NetEvolve.Arguments/NetEvolve.Arguments.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Polyfill">
24+
<PackageReference Include="Polyfill" Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net5.0' ">
2525
<PrivateAssets>all</PrivateAssets>
2626
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2727
</PackageReference>

0 commit comments

Comments
 (0)