Esempio n. 1
0
        private static bool CheckContentDefinitionIndex(int contentDefinitionID, DateTime lastModDate)
        {
            Objects.LatestIndex index = GetLatestContentDefinitionIndex();

            //return true to indicate that we need to check again...
            if (contentDefinitionID > 0)
            {
                //checking for a specific def
                Objects.LatestIndexItem indexItem = null;
                if (index.Index.TryGetValue(contentDefinitionID, out indexItem))
                {
                    //found it in the index... check it
                    return(lastModDate < indexItem.ModifiedOn);
                }
                else
                {
                    //not in the index
                    return(lastModDate > DateTime.MinValue);
                }
            }
            else
            {
                //if we don't have a page to check for
                return(lastModDate < index.MaxModDate);
            }
        }
Esempio n. 2
0
        private static bool CheckMediaGalleryIndex(int mediaGalleryID, DateTime lastModDate)
        {
            Objects.LatestIndex index = GetLatestMediaGalleryIndex();

            //return true to indicate that we need to check again...
            if (mediaGalleryID > 0)
            {
                //checking for a specific gallery
                Objects.LatestIndexItem indexItem = null;
                if (index.Index.TryGetValue(mediaGalleryID, out indexItem))
                {
                    //found it in the index... check it
                    return(lastModDate < indexItem.ModifiedOn);
                }
                else
                {
                    //not in the index, there are not items in this view anymore, only need to check latest if latestVersionID is not 0 (zero)
                    return(lastModDate > DateTime.MinValue);
                }
            }
            else
            {
                //if we don't have a page to check for
                return(lastModDate < index.MaxModDate);
            }
        }