NTP Analyzer  0.8.2
Analyze the operation of time servers
Ntp.Analyzer.Data.DatabaseInitializer Class Reference
Collaboration diagram for Ntp.Analyzer.Data.DatabaseInitializer:

Public Member Functions

 DatabaseInitializer (bool initialize, bool upgrade, LogBase log)
 
bool Execute ()
 

Private Member Functions

void CreateDatabase ()
 
void CreateTables ()
 

Private Attributes

readonly bool initialize
 
readonly LogBase log
 
readonly DatabaseUpdater updater
 
readonly bool upgrade
 

Detailed Description

Definition at line 34 of file DatabaseInitializer.cs.

Constructor & Destructor Documentation

Ntp.Analyzer.Data.DatabaseInitializer.DatabaseInitializer ( bool  initialize,
bool  upgrade,
LogBase  log 
)
inline

Member Function Documentation

void Ntp.Analyzer.Data.DatabaseInitializer.CreateDatabase ( )
inlineprivate

Definition at line 74 of file DatabaseInitializer.cs.

References Ntp.Data.Provider.SqlDatabaseFactory.CreateDatabase(), e, and Ntp.Data.Provider.SqlDatabaseFactory.Instance.

75  {
76  try
77  {
79  }
80  catch (Exception e)
81  {
82  log.CreateDatabaseError(e);
83  }
84  }
var e
Definition: bootstrap.min.js:6
static SqlDatabaseFactory Instance

Here is the call graph for this function:

void Ntp.Analyzer.Data.DatabaseInitializer.CreateTables ( )
inlineprivate

Definition at line 86 of file DatabaseInitializer.cs.

References Ntp.Analyzer.Data.Sql.SqlDatabaseMapper< T >.CheckTable(), and e.

87  {
88  TimeServerDatabaseMapper timeServerMapper;
89  PeerDatabaseMapper peerMapper;
90  HostDatabaseMapper hostMapper;
91 
92  var initializers = new List<ITableInitializer>();
93  initializers.Add(timeServerMapper = new TimeServerDatabaseMapper(log));
94  initializers.Add(peerMapper = new PeerDatabaseMapper(timeServerMapper, log));
95  initializers.Add(hostMapper = new HostDatabaseMapper(log));
96  initializers.Add(new HostReadingDatabaseMapper(hostMapper, peerMapper, log));
97  initializers.Add(new PeerReadingDatabaseMapper(hostMapper, peerMapper, log));
98  initializers.Add(new HostIoReadingDatabaseMapper(hostMapper, log));
99  initializers.Add(new DriftReadingDatabaseMapper(hostMapper, log));
100  initializers.Add(new PeerActivityDatabaseMapper(hostMapper, peerMapper, log));
101  initializers.Add(new AssociationEntryMapper(log));
102 
103  foreach (var initializer in initializers)
104  {
105  try
106  {
107  initializer.CheckTable();
108  }
109  catch (Exception e)
110  {
111  log.CreateTableError(e);
112  }
113  }
114  }
var e
Definition: bootstrap.min.js:6
OR/M mapper for table associationEntry.

Here is the call graph for this function:

bool Ntp.Analyzer.Data.DatabaseInitializer.Execute ( )
inline

Member Data Documentation

readonly bool Ntp.Analyzer.Data.DatabaseInitializer.initialize
private

Definition at line 50 of file DatabaseInitializer.cs.

readonly LogBase Ntp.Analyzer.Data.DatabaseInitializer.log
private

Definition at line 52 of file DatabaseInitializer.cs.

readonly DatabaseUpdater Ntp.Analyzer.Data.DatabaseInitializer.updater
private

Definition at line 54 of file DatabaseInitializer.cs.

readonly bool Ntp.Analyzer.Data.DatabaseInitializer.upgrade
private

Definition at line 56 of file DatabaseInitializer.cs.


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