private string CreateRocketExtendScript(ApplicationConfigurationDto config)
        {
            var script = new StringBuilder();

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

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

        //     Logger.LogDebug ("Executing RocketApplicationConfigurationAppService.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 RocketApplicationConfigurationAppService.GetAsync().");

        //     return result;
        // }

        public virtual async Task <ApplicationConfigurationDto> GetAsync()
        {
            var commonConfigurationCacheItem = await GetCommonConfigurationCacheItemAsync();

            var personalConfigurationCacheItem = await GetPersonalConfigurationCacheItemAsync();

            var result = new ApplicationConfigurationDto {
                Localization     = commonConfigurationCacheItem.Localization,
                Auth             = personalConfigurationCacheItem.Auth,
                Features         = personalConfigurationCacheItem.Features,
                Setting          = personalConfigurationCacheItem.Setting,
                MultiTenancy     = GetMultiTenancy(),
                CurrentTenant    = GetCurrentTenant(),
                CurrentUser      = GetCurrentUser(),
                ObjectExtensions = _cachedObjectExtensionsDtoService.Get()
            };

            return(result);
        }