mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-09-30 22:28:28 +00:00
Minor improvements
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
<ProjectGuid>{9790FACF-170E-43C7-889A-D4445FC7E7A1}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Ntp.Analyzer.Validate.Cli</RootNamespace>
|
||||
<AssemblyName>ntpav</AssemblyName>
|
||||
<ReleaseVersion>0.3</ReleaseVersion>
|
||||
<StartupObject>Ntp.Analyzer.Validate.Cli.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
@@ -22,6 +21,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
<Commandlineparameters>~/code/ntpa/example/ntpa.stat.conf</Commandlineparameters>
|
||||
<AssemblyName>ntpav</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
@@ -30,6 +30,13 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Externalconsole>true</Externalconsole>
|
||||
<AssemblyName>ntpav</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Server|AnyCPU' ">
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Server</OutputPath>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AssemblyName>Ntp.Analyzer.Validate.Cli</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
||||
@@ -40,24 +40,31 @@ namespace Ntp.Analyzer.Validate.Cli
|
||||
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
if (args.Length != 1) {
|
||||
Console.WriteLine ("NTP Analyzer validator tool.");
|
||||
Console.WriteLine ("Usage: ntpav configuration");
|
||||
// Neutralize.
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
|
||||
if (args.Length == 0 || args.Length > 2) {
|
||||
ShowUsage ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.Length == 1 && args[0] == "help") {
|
||||
ShowUsage ();
|
||||
return;
|
||||
}
|
||||
|
||||
string configFile = args [0];
|
||||
|
||||
// Neutralize.
|
||||
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
|
||||
Configuration config = LoadConfig (configFile);
|
||||
if (config == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine ("Parsed config ...");
|
||||
Console.WriteLine (config);
|
||||
|
||||
if (args.Length == 2 && args [1] == "verbose") {
|
||||
Console.WriteLine (config);
|
||||
}
|
||||
|
||||
TestFilesystem (config);
|
||||
|
||||
@@ -122,5 +129,11 @@ namespace Ntp.Analyzer.Validate.Cli
|
||||
Console.WriteLine (ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private static void ShowUsage()
|
||||
{
|
||||
Console.WriteLine ("NTP Analyzer validator tool.");
|
||||
Console.WriteLine ("Usage: ntpav configuration [verbose]");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user