You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>Sets the keepalive interval (set in seconds).</summary>
30
+
[CommandLineOption("keepalive","Keep Alive interval (set in seconds).")]
31
+
privateintKeepAlive{get;set;}=0;
27
32
28
-
/// <summary>URI to node's API interface.</summary>
29
33
publicTimerKeepaliveTimer{get;privateset;}
30
34
31
35
/// <summary>
@@ -35,99 +39,31 @@ public class ApiSettings
35
39
/// Password protected certificates are not supported. On MacOs, only p12 certificates can be used without password.
36
40
/// Please refer to .Net Core documentation for usage: <seealso cref="https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2.-ctor?view=netcore-2.1#System_Security_Cryptography_X509Certificates_X509Certificate2__ctor_System_Byte___" />.
37
41
/// </remarks>
38
-
publicstringHttpsCertificateFilePath{get;set;}
42
+
[CommandLineOption("certificatefilepath","Path to the certificate used for https traffic encryption. Password protected files are not supported. On MacOs, only p12 certificates can be used without password.",false)]
thrownewConfigurationException("The path to a certificate needs to be provided when using https. Please use the argument 'certificatefilepath' to provide it.");
/// <summary>Prints the help information on how to configure the API settings to the logger.</summary>
97
-
/// <param name="network">The network to use.</param>
98
-
publicstaticvoidPrintHelp(Networknetwork)
99
-
{
100
-
varbuilder=newStringBuilder();
101
-
102
-
builder.AppendLine($"-apiuri=<string> URI to node's API interface. Defaults to '{DefaultApiHost }'.");
103
-
builder.AppendLine($"-apiport=<0-65535> Port of node's API interface. Defaults to {network.DefaultAPIPort }.");
104
-
builder.AppendLine($"-keepalive=<seconds> Keep Alive interval (set in seconds). Default: 0 (no keep alive).");
105
-
builder.AppendLine($"-usehttps=<bool> Use https protocol on the API. Defaults to false.");
106
-
builder.AppendLine($"-certificatefilepath=<string> Path to the certificate used for https traffic encryption. Defaults to <null>. Password protected files are not supported. On MacOs, only p12 certificates can be used without password.");
builder.AppendLine($"#Keep Alive interval (set in seconds). Default: 0 (no keep alive).");
125
-
builder.AppendLine($"#keepalive=0");
126
-
builder.AppendLine($"#Use HTTPS protocol on the API. Default is false.");
127
-
builder.AppendLine($"#usehttps=false");
128
-
builder.AppendLine($"#Path to the file containing the certificate to use for https traffic encryption. Password protected files are not supported. On MacOs, only p12 certificates can be used without password.");
129
-
builder.AppendLine(@"#Please refer to .Net Core documentation for usage: 'https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2.-ctor?view=netcore-2.1#System_Security_Cryptography_X509Certificates_X509Certificate2__ctor_System_Byte___'.");
0 commit comments