Skip to content

Commit

Permalink
Merge pull request #280 from martincostello/DotNet-5
Browse files Browse the repository at this point in the history
Support .NET 5
  • Loading branch information
martincostello authored Nov 10, 2020
2 parents 2aa09ae + cb4d1c7 commit 6b62d81
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netstandard2.0' ">
<PackageVersion Include="System.Memory" Version="4.5.1" />
</ItemGroup>
<ItemGroup Condition=" '$(AssemblyName)' == 'JustEat.StatsD' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageVersion Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(AssemblyName)' != 'JustEat.StatsD' ">
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="3.1.9" />
<PackageVersion Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.9" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
<PackageVersion Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" PrivateAssets="All" />
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ We use this library within our components to publish [StatsD](http://github.com/

### Supported platforms

`JustEat.StatsD` version 4.1.0 is built for these target frameworks:
`JustEat.StatsD` version 4.2.0 is built for these target frameworks:

* `net461`
* `netstandard2.0`
* `netstandard2.1`
* `netcoreapp2.1`
* `net5.0`

### Features

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "3.1.403",
"version": "5.0.100",
"allowPrerelease": false,
"rollForward": "latestMajor"
}
Expand Down
2 changes: 1 addition & 1 deletion src/JustEat.StatsD/ConnectedSocketPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private Socket CreateSocket()
/// <returns>An object from the pool. </returns>
private Socket? Pop()
{
if (_pool.TryTake(out Socket result))
if (_pool.TryTake(out Socket? result))
{
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/JustEat.StatsD/EndpointLookups/EndPointFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static IEndPointSource MakeEndPointSource(string host, int port, TimeSpan

IEndPointSource source;

if (IPAddress.TryParse(host, out IPAddress address))
if (IPAddress.TryParse(host, out IPAddress? address))
{
// If we were given an IP instead of a hostname,
// we can happily keep it the life of this class
Expand Down
2 changes: 1 addition & 1 deletion src/JustEat.StatsD/JustEat.StatsD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageId>JustEat.StatsD</PackageId>
<RootNamespace>JustEat.StatsD</RootNamespace>
<Summary>A .NET library for publishing metrics to StatsD.</Summary>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;netcoreapp2.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
Expand Down
2 changes: 1 addition & 1 deletion tests/JustEat.StatsD.Tests/JustEat.StatsD.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<NoWarn>$(NoWarn);CA1707;CA2007</NoWarn>
<RootNamespace>JustEat.StatsD</RootNamespace>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\JustEat.StatsD\JustEat.StatsD.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<VersionPrefix>4.1.0</VersionPrefix>
<VersionPrefix>4.2.0</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)' == '' AND '$(GITHUB_ACTIONS)' != '' ">beta$([System.Convert]::ToInt32(`$(GITHUB_RUN_NUMBER)`).ToString(`0000`))</VersionSuffix>
<VersionPrefix Condition=" $(GITHUB_REF.StartsWith(`refs/tags/v`)) ">$(GITHUB_REF.Replace('refs/tags/v', ''))</VersionPrefix>
<VersionSuffix Condition=" $(GITHUB_REF.StartsWith(`refs/tags/v`)) "></VersionSuffix>
Expand Down

0 comments on commit 6b62d81

Please sign in to comment.