protected virtual Task <ApplicationGlobalFeatureConfigurationDto> GetGlobalFeaturesConfigAsync() { var result = new ApplicationGlobalFeatureConfigurationDto(); foreach (var enabledFeatureName in GlobalFeatureManager.Instance.GetEnabledFeatureNames()) { result.EnabledFeatures.AddIfNotContains(enabledFeatureName); } return(Task.FromResult(result)); }
protected virtual Task <ApplicationGlobalFeatureConfigurationDto> GetGlobalFeaturesConfigAsync() { var result = new ApplicationGlobalFeatureConfigurationDto(); foreach (var enabledFeatureName in GlobalFeatureManager.Instance.GetEnabledFeatureNames()) { result.EnabledFeatures.AddIfNotContains(enabledFeatureName); } foreach (var module in GlobalFeatureManager.Instance.Modules) { result.ModuleEnabledFeatures.AddIfNotContains(new KeyValuePair <string, List <string> >(module.Key, module.Value.GetFeatures().Select(x => x.FeatureName).ToList())); } return(Task.FromResult(result)); }