Ejemplo n.º 1
0
        /// <summary>
        /// Returns a collection of portal ID's to reindex if it was requested since last indexing
        /// </summary>
        /// <param name="startDate"></param>
        /// <returns></returns>
        public IEnumerable <int> GetPortalsToReindex(DateTime startDate)
        {
            var portals2Reindex = new PortalController().GetPortals().Cast <PortalInfo>()
                                  .Where(portal => IsReindexRequested(portal.PortalID, startDate))
                                  .Select(portal => portal.PortalID);

            if (IsReindexRequested(-1, startDate))
            {
                // Include Host Level
                portals2Reindex = portals2Reindex.Concat(new[] { -1 });
            }

            return(portals2Reindex.ToArray());
        }