Skip to main content
  1. For the sake of clarity, I decided to go with the public call to getConfig().

  2. 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.");
     }
    

    }

  1. For the sake of clarity, I decided to go with the public call to getConfig().

  2. 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();
    
         Poller = new Poller();
         Poller.Start();
    
         Logger.Warn("service started.");
     }
    
  1. For the sake of clarity, I decided to go with the public call to getConfig().

  2. 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();

     Poller = new Poller();
     Poller.Start();
    
     Logger.Warn("service started.");
    

    }

deleted 12 characters in body
Source Link
Joseph
  • 393
  • 4
  • 7
  1. For the sake of clarity, I decided to go with the public call to getConfig().

  2. 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();
    
         Poller = new Poller();
         Poller.Start();
    
         Logger.Warn("Idoc Update service"service started.");
     }
    
  1. For the sake of clarity, I decided to go with the public call to getConfig().

  2. 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();
    
         Poller = new Poller();
         Poller.Start();
    
         Logger.Warn("Idoc Update service started.");
     }
    
  1. For the sake of clarity, I decided to go with the public call to getConfig().

  2. 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();
    
         Poller = new Poller();
         Poller.Start();
    
         Logger.Warn("service started.");
     }
    
Source Link
Joseph
  • 393
  • 4
  • 7

  1. For the sake of clarity, I decided to go with the public call to getConfig().

  2. 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();
    
         Poller = new Poller();
         Poller.Start();
    
         Logger.Warn("Idoc Update service started.");
     }