예제 #1
0
        public string GetFeedEntryLinkValue(FeedGenerators.Core.Enums.Language language)
        {
            var catalog = FeedUtils.GetCatalog(AttributesDictionary, language);
            var sku     = GetAttributeValue("linkSku").ToString();

            return(catalog == "ebooks" ? _reader["KoboItemPageURL"].ToString() : FeedUtils.GetProductUrl(BaseUrl, catalog, sku, language, false));
        }
예제 #2
0
        public object GetLocalizedResult(FeedGenerators.Core.Enums.Language language, string localizedKey, string english)
        {
            var result = GetAttributeValue(localizedKey);

            if (language != FeedGenerators.Core.Enums.Language.English &&
                (result == DBNull.Value || result == null ||
                 result is string && string.IsNullOrWhiteSpace((string)result)))
            {
                Log.DebugFormat("Result is null/empty for non-English language: {0}", language);
                result = GetAttributeValue(english);
            }

            return(result);
        }