コード例 #1
0
        /// <summary>
        /// Gets content from the ContentItemCountryLanguages table according user location/language.
        /// </summary>
        /// <param name="request"></param>
        public static List <ContentItem> GetContentBlock(GetContentItemCountryLanguagesRequest request)
        {
            var content = ContentService.GetContentItemCountryLanguages(request);

            // Default to US English if the content block does not exist for specified country/language.
            if (!content.Any())
            {
                request.CountryCode = CountryCodes.UnitedStates;
                request.LanguageID  = Languages.English;
                content             = ContentService.GetContentItemCountryLanguages(request);
            }
            return(content);
        }
コード例 #2
0
 /// <summary>
 /// Retrieves alert from ContentItemCountryLanguages database table.
 /// </summary>
 /// <param name="contentItemCountryLanguagesRequest"></param>
 /// <returns></returns>
 public static List <ContentItem> GetAlert(GetContentItemCountryLanguagesRequest contentItemCountryLanguagesRequest)
 {
     return(ContentService.GetContentItemCountryLanguages(contentItemCountryLanguagesRequest));
 }