1- using System ;
1+ #nullable enable
2+ using System ;
23
34using Renci . SshNet . Common ;
45
@@ -14,7 +15,7 @@ public class KeyboardInteractiveConnectionInfo : ConnectionInfo, IDisposable
1415 /// <summary>
1516 /// Occurs when server prompts for more authentication information.
1617 /// </summary>
17- public event EventHandler < AuthenticationPromptEventArgs > AuthenticationPrompt ;
18+ public event EventHandler < AuthenticationPromptEventArgs > ? AuthenticationPrompt ;
1819
1920 /// <summary>
2021 /// Initializes a new instance of the <see cref="KeyboardInteractiveConnectionInfo"/> class.
@@ -46,7 +47,7 @@ public KeyboardInteractiveConnectionInfo(string host, int port, string username)
4647 /// <param name="proxyType">Type of the proxy.</param>
4748 /// <param name="proxyHost">The proxy host.</param>
4849 /// <param name="proxyPort">The proxy port.</param>
49- public KeyboardInteractiveConnectionInfo ( string host , int port , string username , ProxyTypes proxyType , string proxyHost , int proxyPort )
50+ public KeyboardInteractiveConnectionInfo ( string host , int port , string username , ProxyTypes proxyType , string ? proxyHost , int proxyPort )
5051 : this ( host , port , username , proxyType , proxyHost , proxyPort , string . Empty , string . Empty )
5152 {
5253 }
@@ -61,7 +62,7 @@ public KeyboardInteractiveConnectionInfo(string host, int port, string username,
6162 /// <param name="proxyHost">The proxy host.</param>
6263 /// <param name="proxyPort">The proxy port.</param>
6364 /// <param name="proxyUsername">The proxy username.</param>
64- public KeyboardInteractiveConnectionInfo ( string host , int port , string username , ProxyTypes proxyType , string proxyHost , int proxyPort , string proxyUsername )
65+ public KeyboardInteractiveConnectionInfo ( string host , int port , string username , ProxyTypes proxyType , string ? proxyHost , int proxyPort , string ? proxyUsername )
6566 : this ( host , port , username , proxyType , proxyHost , proxyPort , proxyUsername , string . Empty )
6667 {
6768 }
@@ -74,7 +75,7 @@ public KeyboardInteractiveConnectionInfo(string host, int port, string username,
7475 /// <param name="proxyType">Type of the proxy.</param>
7576 /// <param name="proxyHost">The proxy host.</param>
7677 /// <param name="proxyPort">The proxy port.</param>
77- public KeyboardInteractiveConnectionInfo ( string host , string username , ProxyTypes proxyType , string proxyHost , int proxyPort )
78+ public KeyboardInteractiveConnectionInfo ( string host , string username , ProxyTypes proxyType , string ? proxyHost , int proxyPort )
7879 : this ( host , DefaultPort , username , proxyType , proxyHost , proxyPort , string . Empty , string . Empty )
7980 {
8081 }
@@ -88,7 +89,7 @@ public KeyboardInteractiveConnectionInfo(string host, string username, ProxyType
8889 /// <param name="proxyHost">The proxy host.</param>
8990 /// <param name="proxyPort">The proxy port.</param>
9091 /// <param name="proxyUsername">The proxy username.</param>
91- public KeyboardInteractiveConnectionInfo ( string host , string username , ProxyTypes proxyType , string proxyHost , int proxyPort , string proxyUsername )
92+ public KeyboardInteractiveConnectionInfo ( string host , string username , ProxyTypes proxyType , string ? proxyHost , int proxyPort , string ? proxyUsername )
9293 : this ( host , DefaultPort , username , proxyType , proxyHost , proxyPort , proxyUsername , string . Empty )
9394 {
9495 }
@@ -103,7 +104,7 @@ public KeyboardInteractiveConnectionInfo(string host, string username, ProxyType
103104 /// <param name="proxyPort">The proxy port.</param>
104105 /// <param name="proxyUsername">The proxy username.</param>
105106 /// <param name="proxyPassword">The proxy password.</param>
106- public KeyboardInteractiveConnectionInfo ( string host , string username , ProxyTypes proxyType , string proxyHost , int proxyPort , string proxyUsername , string proxyPassword )
107+ public KeyboardInteractiveConnectionInfo ( string host , string username , ProxyTypes proxyType , string ? proxyHost , int proxyPort , string ? proxyUsername , string ? proxyPassword )
107108 : this ( host , DefaultPort , username , proxyType , proxyHost , proxyPort , proxyUsername , proxyPassword )
108109 {
109110 }
@@ -119,7 +120,7 @@ public KeyboardInteractiveConnectionInfo(string host, string username, ProxyType
119120 /// <param name="proxyPort">The proxy port.</param>
120121 /// <param name="proxyUsername">The proxy username.</param>
121122 /// <param name="proxyPassword">The proxy password.</param>
122- public KeyboardInteractiveConnectionInfo ( string host , int port , string username , ProxyTypes proxyType , string proxyHost , int proxyPort , string proxyUsername , string proxyPassword )
123+ public KeyboardInteractiveConnectionInfo ( string host , int port , string username , ProxyTypes proxyType , string ? proxyHost , int proxyPort , string ? proxyUsername , string ? proxyPassword )
123124 : base ( host , port , username , proxyType , proxyHost , proxyPort , proxyUsername , proxyPassword , new KeyboardInteractiveAuthenticationMethod ( username ) )
124125 {
125126 foreach ( var authenticationMethod in AuthenticationMethods )
@@ -131,7 +132,7 @@ public KeyboardInteractiveConnectionInfo(string host, int port, string username,
131132 }
132133 }
133134
134- private void AuthenticationMethod_AuthenticationPrompt ( object sender , AuthenticationPromptEventArgs e )
135+ private void AuthenticationMethod_AuthenticationPrompt ( object ? sender , AuthenticationPromptEventArgs e )
135136 {
136137#pragma warning disable MA0091 // Sender should be 'this' for instance events
137138 AuthenticationPrompt ? . Invoke ( sender , e ) ;
0 commit comments