AI OnAI Off
PropertyCriteriaCollection criterias = new PropertyCriteriaCollection();
PropertyCriteria pubCriteria = new PropertyCriteria();
pubCriteria.Condition = EPiServer.Filters.CompareCondition.Equal;
pubCriteria.Name = "PagePendingPublish";
pubCriteria.Type = PropertyDataType.Boolean;
pubCriteria.Value = true.ToString();
criterias.Add(pubCriteria);
PageDataCollection matches = DataFactory.Instance.FindPagesWithCriteria(
PageReference.StartPage, criterias);
foreach (PageData match in matches)
{
//have to retrieve the unpublished version
PageReference realReference = new PageReference(match.PageLink.ID, true);
PageData unPublishedPageData = GetPage(realReference);
//check any property value here...
}