NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Import.Importer< T > Class Template Referenceabstract
Inheritance diagram for Ntp.Analyzer.Import.Importer< T >:
Collaboration diagram for Ntp.Analyzer.Import.Importer< T >:

Public Member Functions

void Execute ()
 
IEnumerator< T > GetEnumerator ()
 

Protected Member Functions

 Importer (LogBase log)
 
virtual void Initialize ()
 
abstract void ReadFromStream ()
 

Protected Attributes

IList< T > Entries => entries
 

Properties

abstract string Arguments [get]
 
abstract string Command [get]
 
abstract string ErrorMessage [get]
 
LogBase Log [get]
 
StreamReader Reader [get, private set]
 

Private Member Functions

IEnumerator IEnumerable. GetEnumerator ()
 

Private Attributes

List< T > entries
 
readonly object locker = new object()
 

Detailed Description

Definition at line 30 of file ShellImporter.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Import.Importer< T >.Importer ( LogBase  log)
inlineprotected

Definition at line 32 of file ShellImporter.cs.

33  {
34  Log = log;
35  }

Member Function Documentation

void Ntp.Analyzer.Import.Importer< T >.Execute ( )
inline

Definition at line 63 of file ShellImporter.cs.

Referenced by Ntp.Analyzer.Process.Description.PeerStatJob.Import(), Ntp.Analyzer.Process.Description.HostIoStatJob.InternalExecute(), and Ntp.Analyzer.Process.Description.HostStatJob.InternalExecute().

64  {
65  lock (locker)
66  {
67  if (entries != null)
68  return;
69 
70  Initialize();
71 
72  var command = new ShellCommand(Command, Arguments, Log, ErrorMessage);
73  Reader = command.Execute();
74  if (Reader == null)
75  return;
76 
78  }
79  }
abstract void ReadFromStream()
abstract string ErrorMessage

Here is the caller graph for this function:

IEnumerator<T> Ntp.Analyzer.Import.Importer< T >.GetEnumerator ( )
inline

Definition at line 52 of file ShellImporter.cs.

53  {
54  Execute();
55  return entries.GetEnumerator();
56  }
IEnumerator IEnumerable. Ntp.Analyzer.Import.Importer< T >.GetEnumerator ( )
inlineprivate

Definition at line 58 of file ShellImporter.cs.

59  {
60  return GetEnumerator();
61  }
IEnumerator< T > GetEnumerator()
virtual void Ntp.Analyzer.Import.Importer< T >.Initialize ( )
inlineprotectedvirtual

Reimplemented in Ntp.Analyzer.Import.NtpdcImporter, and Ntp.Analyzer.Import.NtpqHostImporter.

Definition at line 81 of file ShellImporter.cs.

82  {
83  entries = new List<T>();
84  }

Member Data Documentation

List<T> Ntp.Analyzer.Import.Importer< T >.entries
private

Definition at line 38 of file ShellImporter.cs.

IList<T> Ntp.Analyzer.Import.Importer< T >.Entries => entries
protected

Definition at line 42 of file ShellImporter.cs.

readonly object Ntp.Analyzer.Import.Importer< T >.locker = new object()
private

Definition at line 37 of file ShellImporter.cs.

Property Documentation

abstract string Ntp.Analyzer.Import.Importer< T >.Arguments
getprotected

Definition at line 48 of file ShellImporter.cs.

abstract string Ntp.Analyzer.Import.Importer< T >.Command
getprotected

Definition at line 46 of file ShellImporter.cs.

abstract string Ntp.Analyzer.Import.Importer< T >.ErrorMessage
getprotected

Definition at line 50 of file ShellImporter.cs.

LogBase Ntp.Analyzer.Import.Importer< T >.Log
getprotected

Definition at line 44 of file ShellImporter.cs.

StreamReader Ntp.Analyzer.Import.Importer< T >.Reader
getprivate setprotected

Definition at line 40 of file ShellImporter.cs.


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