private async Task <ApplicationSettingConfigurationDto> GetSettingConfigAsync()
        {
            var result = new ApplicationSettingConfigurationDto
            {
                Values = new Dictionary <string, string>()
            };

            var settingDefinitions = _settingDefinitionManager.GetAll().Where(x => x.IsVisibleToClients);

            var settingValues = await _settingProvider.GetAllAsync(settingDefinitions.Select(x => x.Name).ToArray());

            foreach (var settingValue in settingValues)
            {
                result.Values[settingValue.Name] = settingValue.Value;
            }

            return(result);
        }
Example #2
0
        private async Task <ApplicationSettingConfigurationDto> GetSettingConfigAsync()
        {
            var result = new ApplicationSettingConfigurationDto
            {
                Values = new Dictionary <string, string>()
            };

            foreach (var settingDefinition in _settingDefinitionManager.GetAll())
            {
                if (!settingDefinition.IsVisibleToClients)
                {
                    continue;
                }

                result.Values[settingDefinition.Name] = await _settingProvider.GetOrNullAsync(settingDefinition.Name);
            }

            return(result);
        }
        private async Task <ApplicationSettingConfigurationDto> GetSettingConfigAsync()
        {
            Logger.LogDebug("Executing AbpApplicationConfigurationAppService.GetSettingConfigAsync()");

            var result = new ApplicationSettingConfigurationDto
            {
                Values = new Dictionary <string, string>()
            };

            foreach (var settingDefinition in _settingDefinitionManager.GetAll())
            {
                if (!settingDefinition.IsVisibleToClients)
                {
                    continue;
                }

                result.Values[settingDefinition.Name] = await _settingProvider.GetOrNullAsync(settingDefinition.Name).ConfigureAwait(false);
            }

            Logger.LogDebug("Executed AbpApplicationConfigurationAppService.GetSettingConfigAsync()");

            return(result);
        }