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