Skip to content

Commit

Permalink
fix: Polyfill updated as a conditional dependency (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion authored Jun 23, 2024
1 parent 126c860 commit 0a920e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageVersion Include="coverlet.msbuild" Version="6.0.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="NetEvolve.Extensions.XUnit" Version="2.2.12" />
<PackageVersion Include="Polyfill" Version="5.5.2" />
<PackageVersion Include="Polyfill" Version="5.4.0" />
<PackageVersion Include="xunit" Version="2.8.1" />
</ItemGroup>

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ Throws an `ArgumentNullException` if the argument is `null`. Inplace replacement
### `Argument.ThrowIfNullOrEmpty(string?, string?)`
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**.

### `Argument.ThrowIfNullOrEmpty<T>(IEnumerable<T>?, string?)` (Individuall extension)
Throws an `ArgumentNullException` if the argument is `null` or throws an `ArgumentException` if the argument is empty.

### `Argument.ThrowIfNullOrWhiteSpace(string?, string?)`
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**.
2 changes: 1 addition & 1 deletion src/NetEvolve.Arguments/NetEvolve.Arguments.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Polyfill">
<PackageReference Include="Polyfill" Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net5.0' ">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 0a920e8

Please sign in to comment.