File tree 8 files changed +15
-11
lines changed
NetMQ.Tests/InProcActors/AccountJSON
8 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1
1
<Project >
2
2
3
3
<PropertyGroup >
4
- <LangVersion >8.0 </LangVersion >
4
+ <LangVersion >10 </LangVersion >
5
5
<Nullable >enable</Nullable >
6
+ <ProduceReferenceAssembly >true</ProduceReferenceAssembly >
7
+ <AccelerateBuildsInVisualStudio >true</AccelerateBuildsInVisualStudio >
6
8
</PropertyGroup >
7
9
8
10
<ItemGroup >
9
- <PackageReference Include =" JetBrains.Annotations" Version =" 2021 .3.0 " PrivateAssets =" All" />
11
+ <PackageReference Include =" JetBrains.Annotations" Version =" 2022 .3.1 " PrivateAssets =" All" />
10
12
</ItemGroup >
11
13
12
14
<!-- 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()
19
19
20
20
var updatedAccount = JsonConvert . DeserializeObject < Account > ( actor . ReceiveFrameString ( ) ) ;
21
21
22
+ Assert . NotNull ( updatedAccount ) ;
23
+
22
24
Assert . Equal ( 10.0m , updatedAccount . Balance ) ;
23
25
}
24
26
}
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ public void Run(PairSocket shim)
53
53
54
54
string accountJson = msg [ 2 ] . ConvertToString ( ) ;
55
55
var account = JsonConvert . DeserializeObject < Account > ( accountJson ) ;
56
+ Assumes . NotNull ( accountAction ) ;
57
+ Assumes . NotNull ( account ) ;
56
58
AmendAccount ( accountAction , account ) ;
57
59
shim . SendFrame ( JsonConvert . SerializeObject ( account ) ) ;
58
60
}
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public void Activated(Pipe pipe)
96
96
97
97
public bool Recv ( ref Msg msg )
98
98
{
99
- return RecvPipe ( ref msg , out Pipe _ ) ;
99
+ return RecvPipe ( ref msg , out _ ) ;
100
100
}
101
101
102
102
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)
94
94
95
95
public bool Send ( ref Msg msg )
96
96
{
97
- return SendPipe ( ref msg , out Pipe _ ) ;
97
+ return SendPipe ( ref msg , out _ ) ;
98
98
}
99
99
100
100
public bool SendPipe ( ref Msg msg , out Pipe ? pipe )
Original file line number Diff line number Diff line change 51
51
</ItemGroup >
52
52
53
53
<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" />
55
55
<PackageReference Include =" System.Threading.Tasks.Extensions" Version =" 4.5.4" />
56
56
<Reference Include =" System.ServiceModel" />
57
57
<Reference Include =" System" />
Original file line number Diff line number Diff line change @@ -472,12 +472,11 @@ internal int GetSocketOption(ZmqSocketOption option)
472
472
/// <returns>an object of the given type, that is the value of that option</returns>
473
473
/// <exception cref="TerminatingException">The socket has been stopped.</exception>
474
474
/// <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 )
477
476
{
478
477
m_socketHandle . CheckDisposed ( ) ;
479
478
480
- return ( T ) m_socketHandle . GetSocketOptionX ( option ) ;
479
+ return ( T ? ) m_socketHandle . GetSocketOptionX ( option ) ;
481
480
}
482
481
483
482
/// <summary>
Original file line number Diff line number Diff line change @@ -69,11 +69,10 @@ internal int GetSocketOption(ZmqSocketOption option)
69
69
/// <returns>an object of the given type, that is the value of that option</returns>
70
70
/// <exception cref="TerminatingException">The socket has been stopped.</exception>
71
71
/// <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 )
74
73
{
75
74
m_socket . CheckDisposed ( ) ;
76
- return ( T ) m_socket . GetSocketOptionX ( option ) ;
75
+ return ( T ? ) m_socket . GetSocketOptionX ( option ) ;
77
76
}
78
77
79
78
/// <summary>
You can’t perform that action at this time.
0 commit comments