From a9242667be39cfa264380e0d10eda48f161224fd Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 18 Jun 2022 04:18:20 +0700 Subject: [PATCH] Add `CoreService` ability to return all features --- sources/CoreService.uc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sources/CoreService.uc b/sources/CoreService.uc index f683139..4e3828e 100644 --- a/sources/CoreService.uc +++ b/sources/CoreService.uc @@ -42,7 +42,8 @@ struct FeatureConfigPair var public class featureClass; var public Text configName; }; -var private array automaticConfigs; +var private array automaticConfigs; +var private array< class > availableFeatures; var private LoggerAPI.Definition infoLoadingPackage; var private LoggerAPI.Definition infoBootingUp, infoBootingUpFinished; @@ -179,7 +180,9 @@ private final function LoadManifest(class<_manifest> manifestClass) nextPair.featureClass = manifestClass.default.features[i]; nextPair.configName = manifestClass.default.features[i].static .GetAutoEnabledConfig(); - automaticConfigs[automaticConfigs.length] = nextPair; + automaticConfigs[automaticConfigs.length] = nextPair; + availableFeatures[availableFeatures.length] = + manifestClass.default.features[i]; } for (i = 0; i < manifestClass.default.testCases.length; i += 1) { @@ -202,6 +205,11 @@ public final function array GetAutoConfigurationInfo() return result; } +public final function array< class > GetAvailableFeatures() +{ + return availableFeatures; +} + private final function class<_manifest> LoadManifestClass(string packageName) { return class<_manifest>(DynamicLoadObject( packageName $ manifestSuffix,