public Task <ApplicationConfigurationDto> Get()
        {
            var config = new ApplicationConfigurationDto
            {
                Localization = GetLocalizationConfig()
            };

            return(Task.FromResult(config));
        }
        private string CreateAbpExtendScript(ApplicationConfigurationDto config)
        {
            var script = new StringBuilder();

            script.AppendLine("(function(){");

            script.AppendLine($"$.extend(true, abp, {_jsonSerializer.Serialize(config, indented: Debugger.IsAttached)})");

            script.Append("})();");

            return(script.ToString());
        }
Beispiel #3
0
        private string CreateAbpExtendScript(ApplicationConfigurationDto config)
        {
            var script = new StringBuilder();

            script.AppendLine("(function(){");
            script.AppendLine();
            script.AppendLine($"$.extend(true, abp, {_jsonSerializer.Serialize(config, indented: true)})");
            script.AppendLine();
            script.AppendLine("abp.event.trigger('abp.configurationInitialized');");
            script.AppendLine();
            script.Append("})();");

            return(script.ToString());
        }
Beispiel #4
0
        public virtual async Task <ApplicationConfigurationDto> GetAsync()
        {
            //TODO: Optimize & cache..?

            Logger.LogDebug("Executing AbpApplicationConfigurationAppService.GetAsync()...");

            var result = new ApplicationConfigurationDto
            {
                Auth             = await GetAuthConfigAsync(),
                Features         = await GetFeaturesConfigAsync(),
                Localization     = await GetLocalizationConfigAsync(),
                CurrentUser      = GetCurrentUser(),
                Setting          = await GetSettingConfigAsync(),
                MultiTenancy     = GetMultiTenancy(),
                CurrentTenant    = GetCurrentTenant(),
                ObjectExtensions = _cachedObjectExtensionsDtoService.Get()
            };

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

            return(result);
        }