Skip to content

Commit

Permalink
Merge pull request #1057 from drewnoakes/updates
Browse files Browse the repository at this point in the history
Bump packages and address warnings
  • Loading branch information
drewnoakes authored Apr 28, 2023
2 parents 3b8923b + 550b330 commit cdf1775
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
6 changes: 4 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<Project>

<PropertyGroup>
<LangVersion>8.0</LangVersion>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2022.3.1" PrivateAssets="All" />
</ItemGroup>

<!-- Workaround for https://github.com/dotnet/sourcelink/issues/572 -->
Expand Down
2 changes: 2 additions & 0 deletions src/NetMQ.Tests/InProcActors/AccountJSON/AccountActorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public void AccountActorJsonSendReceiveTests()

var updatedAccount = JsonConvert.DeserializeObject<Account>(actor.ReceiveFrameString());

Assert.NotNull(updatedAccount);

Assert.Equal(10.0m, updatedAccount.Balance);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public void Run(PairSocket shim)

string accountJson = msg[2].ConvertToString();
var account = JsonConvert.DeserializeObject<Account>(accountJson);
Assumes.NotNull(accountAction);
Assumes.NotNull(account);
AmendAccount(accountAction, account);
shim.SendFrame(JsonConvert.SerializeObject(account));
}
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/Core/Patterns/Utils/FairQueueing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void Activated(Pipe pipe)

public bool Recv(ref Msg msg)
{
return RecvPipe(ref msg, out Pipe _);
return RecvPipe(ref msg, out _);
}

public bool RecvPipe(ref Msg msg, [NotNullWhen(returnValue: true)] out Pipe? pipe)
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/Core/Patterns/Utils/LoadBalancer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void Activated(Pipe pipe)

public bool Send(ref Msg msg)
{
return SendPipe(ref msg, out Pipe _);
return SendPipe(ref msg, out _);
}

public bool SendPipe(ref Msg msg, out Pipe? pipe)
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/NetMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<Reference Include="System.ServiceModel" />
<Reference Include="System" />
Expand Down
5 changes: 2 additions & 3 deletions src/NetMQ/NetMQSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,11 @@ internal int GetSocketOption(ZmqSocketOption option)
/// <returns>an object of the given type, that is the value of that option</returns>
/// <exception cref="TerminatingException">The socket has been stopped.</exception>
/// <exception cref="ObjectDisposedException">This object is already disposed.</exception>
[return: MaybeNull]
internal T GetSocketOptionX<T>(ZmqSocketOption option)
internal T? GetSocketOptionX<T>(ZmqSocketOption option)
{
m_socketHandle.CheckDisposed();

return (T)m_socketHandle.GetSocketOptionX(option);
return (T?)m_socketHandle.GetSocketOptionX(option);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ internal int GetSocketOption(ZmqSocketOption option)
/// <returns>an object of the given type, that is the value of that option</returns>
/// <exception cref="TerminatingException">The socket has been stopped.</exception>
/// <exception cref="ObjectDisposedException">This object is already disposed.</exception>
[return: MaybeNull]
internal T GetSocketOptionX<T>(ZmqSocketOption option)
internal T? GetSocketOptionX<T>(ZmqSocketOption option)
{
m_socket.CheckDisposed();
return (T)m_socket.GetSocketOptionX(option);
return (T?)m_socket.GetSocketOptionX(option);
}

/// <summary>
Expand Down

0 comments on commit cdf1775

Please sign in to comment.