File tree 6 files changed +10
-8
lines changed
NetMQ.Tests/InProcActors/AccountJSON
6 files changed +10
-8
lines changed 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 @@ -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