/// <summary>Matches an item against the current filter.</summary> /// <param name="item"></param> /// <returns></returns> public override bool Match(ContentItem item) { var isMatch = item.IsPage; if (isMatch && RequirePublished) isMatch &= item.IsPublished() && !item.IsExpired(); if (isMatch && RequireVisible) isMatch &= item.Visible; if (isMatch && RequireAuthorized) isMatch &= new AccessFilter().Match(item); return isMatch; }
/// <summary>Matches an item against the current filter.</summary> /// <param name="item"></param> /// <returns></returns> public override bool Match(ContentItem item) { var isMatch = item.IsPage; if (isMatch && RequirePublished) { isMatch &= item.IsPublished() && !item.IsExpired(); } if (isMatch && RequireVisible) { isMatch &= item.Visible; } if (isMatch && RequireAuthorized) { isMatch &= new AccessFilter().Match(item); } return(isMatch); }