using System.Linq; using InABox.Configuration; using InABox.Core; using PRSServer; namespace PRSLicensing; public class LicensingDatabaseServerLookupGenerator : LookupGenerator { public LicensingDatabaseServerLookupGenerator(LicensingEngineProperties[] items) : base(items) { } protected override void DoGenerateLookups() { var config = new LocalConfiguration(CoreUtils.GetCommonAppData("PRSServer"), ""); var servers = config.LoadAll(); foreach (var server in servers.Select(x => x.Value.CreateServer(x.Key))) { if (server.Type == ServerType.Database) { AddValue(server.Key, server.Name); } } } }