Beispiel #1
0
 public HomeController(IServerLogService serverlogservice, IServerLogRepository serverlogrepository,
                       IIPLocationRepository iplocationrepository, ISettingsRepository settingsrepository,
                       ISettingsService settingsservice)
 {
     this._serverlogservice     = serverlogservice;
     this._serverlogrepository  = serverlogrepository;
     this._iplocationrepository = iplocationrepository;
     this._settingsrepository   = settingsrepository;
     this._settingsservice      = settingsservice;
 }
 public ServerLogService(IServerLogRepository serverlogrepository, IIPLocationRepository iplocationrepository,
                         ISettingsRepository settingsrepository)
 {
     this.locationsduringruntime = new List <IPLocation>();
     this._serverlogrepository   = serverlogrepository;
     this._iplocationrepository  = iplocationrepository;
     this._settingsrepository    = settingsrepository;
     if (this._settingsrepository.GetAll().OrderByDescending(s => s.ID).Count() > 0)
     {
         this.apikey = this._settingsrepository.GetAll().OrderByDescending(s => s.ID).First().IPLocationAPIKey;
     }
     else
     {
         this.apikey = string.Empty;
     }
 }