public DescriptorsService(ILogger <DescriptorsService> logger, IMemoryCache memoryCache, IConfiguration configuration)
 {
     this.logger      = logger;
     this.memoryCache = memoryCache;
     registrationFile = configuration.GetValue <string>("registrationsFile");
     tunnelsConfig    = configuration.GetSection("Tunnels").Get <TunnelsConfig>();
     LoadDescriptors();
 }
Exemple #2
0
 public DescriptorServiceSqLite(ILogger <DescriptorsService> logger, IConfiguration configuration, DbContext dbContext)
 {
     this.logger           = logger;
     this.configuration    = configuration;
     this.dbContext        = dbContext;
     this.dbSetDescriptors = dbContext.Set <AgentDescriptor>();
     this.dbSetServers     = dbContext.Set <SSHServer>();
     tunnelsConfig         = configuration.GetSection("Tunnels").Get <TunnelsConfig>();
     //InitDb();
 }