mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-10-06 03:39:49 +00:00
Parameter error checking
This commit is contained in:
@@ -34,6 +34,11 @@ namespace Ntp.Monitor.Cli
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
if (args.Length != 3) {
|
||||
ShowUsage();
|
||||
return;
|
||||
}
|
||||
|
||||
IPAddress address;
|
||||
|
||||
if (!IPAddress.TryParse(args[0], out address))
|
||||
@@ -62,6 +67,7 @@ namespace Ntp.Monitor.Cli
|
||||
|
||||
private static void ShowUsage()
|
||||
{
|
||||
Console.WriteLine("NTP Analyzer command query tool.");
|
||||
Console.WriteLine("Usage: ntpac host port command");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user