File tree Expand file tree Collapse file tree 8 files changed +15
-11
lines changed
NetMQ.Tests/InProcActors/AccountJSON Expand file tree Collapse file tree 8 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 11<Project >
22
33 <PropertyGroup >
4- <LangVersion >8.0 </LangVersion >
4+ <LangVersion >10 </LangVersion >
55 <Nullable >enable</Nullable >
6+ <ProduceReferenceAssembly >true</ProduceReferenceAssembly >
7+ <AccelerateBuildsInVisualStudio >true</AccelerateBuildsInVisualStudio >
68 </PropertyGroup >
79
810 <ItemGroup >
9- <PackageReference Include =" JetBrains.Annotations" Version =" 2021 .3.0 " PrivateAssets =" All" />
11+ <PackageReference Include =" JetBrains.Annotations" Version =" 2022 .3.1 " PrivateAssets =" All" />
1012 </ItemGroup >
1113
1214 <!-- Workaround for https://github.com/dotnet/sourcelink/issues/572 -->
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ public void AccountActorJsonSendReceiveTests()
1919
2020 var updatedAccount = JsonConvert . DeserializeObject < Account > ( actor . ReceiveFrameString ( ) ) ;
2121
22+ Assert . NotNull ( updatedAccount ) ;
23+
2224 Assert . Equal ( 10.0m , updatedAccount . Balance ) ;
2325 }
2426 }
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ public void Run(PairSocket shim)
5353
5454 string accountJson = msg [ 2 ] . ConvertToString ( ) ;
5555 var account = JsonConvert . DeserializeObject < Account > ( accountJson ) ;
56+ Assumes . NotNull ( accountAction ) ;
57+ Assumes . NotNull ( account ) ;
5658 AmendAccount ( accountAction , account ) ;
5759 shim . SendFrame ( JsonConvert . SerializeObject ( account ) ) ;
5860 }
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public void Activated(Pipe pipe)
9696
9797 public bool Recv ( ref Msg msg )
9898 {
99- return RecvPipe ( ref msg , out Pipe _ ) ;
99+ return RecvPipe ( ref msg , out _ ) ;
100100 }
101101
102102 public bool RecvPipe ( ref Msg msg , [ NotNullWhen ( returnValue : true ) ] out Pipe ? pipe )
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public void Activated(Pipe pipe)
9494
9595 public bool Send ( ref Msg msg )
9696 {
97- return SendPipe ( ref msg , out Pipe _ ) ;
97+ return SendPipe ( ref msg , out _ ) ;
9898 }
9999
100100 public bool SendPipe ( ref Msg msg , out Pipe ? pipe )
Original file line number Diff line number Diff line change 5151 </ItemGroup >
5252
5353 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework' " >
54- <PackageReference Include =" Microsoft.NETFramework.ReferenceAssemblies" Version =" 1.0.2 " PrivateAssets =" All" />
54+ <PackageReference Include =" Microsoft.NETFramework.ReferenceAssemblies" Version =" 1.0.3 " PrivateAssets =" All" />
5555 <PackageReference Include =" System.Threading.Tasks.Extensions" Version =" 4.5.4" />
5656 <Reference Include =" System.ServiceModel" />
5757 <Reference Include =" System" />
Original file line number Diff line number Diff line change @@ -472,12 +472,11 @@ internal int GetSocketOption(ZmqSocketOption option)
472472 /// <returns>an object of the given type, that is the value of that option</returns>
473473 /// <exception cref="TerminatingException">The socket has been stopped.</exception>
474474 /// <exception cref="ObjectDisposedException">This object is already disposed.</exception>
475- [ return : MaybeNull ]
476- internal T GetSocketOptionX < T > ( ZmqSocketOption option )
475+ internal T ? GetSocketOptionX < T > ( ZmqSocketOption option )
477476 {
478477 m_socketHandle . CheckDisposed ( ) ;
479478
480- return ( T ) m_socketHandle . GetSocketOptionX ( option ) ;
479+ return ( T ? ) m_socketHandle . GetSocketOptionX ( option ) ;
481480 }
482481
483482 /// <summary>
Original file line number Diff line number Diff line change @@ -69,11 +69,10 @@ internal int GetSocketOption(ZmqSocketOption option)
6969 /// <returns>an object of the given type, that is the value of that option</returns>
7070 /// <exception cref="TerminatingException">The socket has been stopped.</exception>
7171 /// <exception cref="ObjectDisposedException">This object is already disposed.</exception>
72- [ return : MaybeNull ]
73- internal T GetSocketOptionX < T > ( ZmqSocketOption option )
72+ internal T ? GetSocketOptionX < T > ( ZmqSocketOption option )
7473 {
7574 m_socket . CheckDisposed ( ) ;
76- return ( T ) m_socket . GetSocketOptionX ( option ) ;
75+ return ( T ? ) m_socket . GetSocketOptionX ( option ) ;
7776 }
7877
7978 /// <summary>
You can’t perform that action at this time.
0 commit comments