For the sake of clarity, I decided to go with the public call to
getConfig()
.The config object's responsibility is to get and store data from the db. Therefore, it would be better to have a separate class do the work of bootstrapping the config tables. My code now looks something like:
protected override void OnStart(string[] args) { ConfigBootstrapper.GetConfigTablesReady(); ConfigSingleton.GetInstance.getConfig();
protected override void OnStart(string[] args) { ConfigBootstrapper.GetConfigTablesReady(); ConfigSingleton.GetInstance.getConfig(); Poller = new Poller(); Poller.Start(); Logger.Warn("service started."); }
}