protected virtual Task <ApplicationGlobalFeatureConfigurationDto> GetGlobalFeaturesConfigAsync()
    {
        var result = new ApplicationGlobalFeatureConfigurationDto();

        foreach (var enabledFeatureName in GlobalFeatureManager.Instance.GetEnabledFeatureNames())
        {
            result.EnabledFeatures.AddIfNotContains(enabledFeatureName);
        }

        return(Task.FromResult(result));
    }
Ejemplo n.º 2
0
    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));
    }