Example #1
0
        /// <summary>
        /// Get a view model with information about presentation.
        /// This functions returns cached data. Use the reset cach to get new updates of the about information texts.
        /// </summary>
        /// <param name="localeIsoCode">A string representing the locale ISO Code, e.g. "sv-SE".</param>
        /// <returns>The view model for a specified locale.</returns>
        public static AboutViewModel GetAboutResultFormatViewModel(string localeIsoCode)
        {
            //Swedish locale
            if (localeIsoCode == "sv-SE")
            {
                if (_aboutResultsSv.IsNull())
                {
                    _aboutResultsSv = CreateAboutResultFormatViewModel(SWEDISH_BASE_URL, localeIsoCode);
                }
                if (_aboutResultsSv.TitleLabel.IsNotEmpty())
                {
                    return(_aboutResultsSv);
                }
            }

            //Default locale
            if (_aboutResults.IsNull())
            {
                _aboutResults = CreateAboutResultFormatViewModel(BASE_URL, localeIsoCode);
            }
            return(_aboutResults);
        }