NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Monitor.Server.CommandFactory Class Reference

Static Public Attributes

static readonly IList< ICommandDescriptionCommands
 

Static Package Functions

static Command Create (string command, string[] args)
 

Detailed Description

Definition at line 29 of file CommandFactory.cs.

Member Function Documentation

static Command Ntp.Analyzer.Monitor.Server.CommandFactory.Create ( string  command,
string[]  args 
)
inlinestaticpackage

Definition at line 50 of file CommandFactory.cs.

References c.

Referenced by Ntp.Analyzer.Monitor.Server.Listener.ReceiveCallback().

51  {
52  var commandDescription = Commands.SingleOrDefault(c => c.Name == command);
53 
54  if (commandDescription == null)
55  return new HelpCommand(true);
56 
57  return Activator.CreateInstance(commandDescription.Type, new object[] {args}) as Command;
58  }
var c
Definition: bootstrap.min.js:6
static readonly IList< ICommandDescription > Commands

Here is the caller graph for this function:

Member Data Documentation

readonly IList<ICommandDescription> Ntp.Analyzer.Monitor.Server.CommandFactory.Commands
static
Initial value:
= new List<ICommandDescription>
{
new CommandDescription<ConfigFileCommand>("config", "Shows name and path of current configuration."),
new CommandDescription<HelpCommand>("help", "Shows valid commands."),
new CommandDescription<JobsCommand>("jobs", "Shows a list of jobs in scheduler."),
new CommandDescription<NextJobCommand>("next", "Shows when next scheduled job will be active."),
new CommandDescription<PidCommand>("pid", "Shows process id of NTPA daemon."),
new CommandDescription<PingCommand>("ping", "Responds if daemon is running."),
new CommandDescription<ProgCommand>("prog", "Shows active configuration."),
new CommandDescription<ScheduleCommand>("schedule", "Shows schedule for active jobs."),
new CommandDescription<ServerCommand>("pages", "Shows number of configured pages on NTPA daemon."),
new CommandDescription<TimeCommand>("time", "Shows current server time in UTC."),
new CommandDescription<UptimeCommand>("uptime", "Shows uptime of NTPA daemon."),
new CommandDescription<VersionCommand>("version", "Shows name and version."),
new CommandDescription<RunningCommand>("running", "Shows a list of running jobs."),
new CommandDescription<ProcCommand>("proc", "Shows a list of jobs and execution time."),
new CommandDescription<ActivityCommand>("activity", "Shows recent activity in scheduler.")
}

Definition at line 31 of file CommandFactory.cs.

Referenced by Ntp.Analyzer.Monitor.Server.TextCommand.HelpCommand.ExecuteTextCommand().


The documentation for this class was generated from the following file: