Carrotware.CMS.Core.ContentPageHelper.GetContentByDateRange C# (CSharp) Method

GetContentByDateRange() public method

public GetContentByDateRange ( System.Guid siteID, System.DateTime dateMidpoint, int iDayRange, ContentPageType pageType, bool bActive, bool bSiteMap, bool bSiteNav, bool bBlock ) : List
siteID System.Guid
dateMidpoint System.DateTime
iDayRange int
pageType ContentPageType
bActive bool
bSiteMap bool
bSiteNav bool
bBlock bool
return List
        public List<ContentPage> GetContentByDateRange(Guid siteID, DateTime dateMidpoint, int iDayRange, ContentPageType.PageType pageType, bool? bActive, bool? bSiteMap, bool? bSiteNav, bool? bBlock)
        {
            //assiging SQL min dates because of 1753 vs 0001 year issues
            DateTime dateBegin = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue; //DateTime.MinValue;
            DateTime dateEnd = (DateTime)System.Data.SqlTypes.SqlDateTime.MaxValue; //DateTime.MaxValue;

            if (iDayRange > 0) {
                dateBegin = dateMidpoint.AddDays(0 - iDayRange);
                dateEnd = dateMidpoint.AddDays(iDayRange);
            }

            List<ContentPage> lstContent = CannedQueries.GetContentByStatusAndDateRange(db, siteID, pageType, dateBegin, dateEnd, bActive, bSiteMap, bSiteNav, bBlock).Select(ct => new ContentPage(ct)).ToList();

            return lstContent;
        }