@@ -48,24 +48,32 @@ public class ShutdownEventArgs : EventArgs
48
48
/// 0 for <see cref="ClassId"/> and <see cref="MethodId"/>.
49
49
/// </summary>
50
50
public ShutdownEventArgs ( ShutdownInitiator initiator , ushort replyCode , string replyText ,
51
- object cause = null , Exception exception = null )
52
- : this ( initiator , replyCode , replyText , 0 , 0 , cause , exception )
51
+ object cause = null )
52
+ : this ( initiator , replyCode , replyText , 0 , 0 , cause )
53
53
{
54
54
}
55
55
56
56
/// <summary>
57
57
/// Construct a <see cref="ShutdownEventArgs"/> with the given parameters.
58
58
/// </summary>
59
59
public ShutdownEventArgs ( ShutdownInitiator initiator , ushort replyCode , string replyText ,
60
- ushort classId , ushort methodId , object cause = null , Exception exception = null )
60
+ ushort classId , ushort methodId , object cause = null )
61
61
{
62
62
Initiator = initiator ;
63
63
ReplyCode = replyCode ;
64
64
ReplyText = replyText ;
65
65
ClassId = classId ;
66
66
MethodId = methodId ;
67
67
Cause = cause ;
68
- _exception = exception ;
68
+ }
69
+
70
+ /// <summary>
71
+ /// Construct a <see cref="ShutdownEventArgs"/> with the given parameters.
72
+ /// </summary>
73
+ public ShutdownEventArgs ( ShutdownInitiator initiator , ushort replyCode , string replyText , Exception exception )
74
+ : this ( initiator , replyCode , replyText , 0 , 0 )
75
+ {
76
+ _exception = exception ?? throw new ArgumentNullException ( nameof ( exception ) ) ;
69
77
}
70
78
71
79
/// <summary>
0 commit comments