public override int IsMatch(Microsoft.SharePoint.SPList list, SPContentTypeId ctId, int ItemId) { if (string.IsNullOrEmpty(ContentTypeID)) { return(SearchMatchLevel.NONE); } SPContentTypeId ct; try { ct = new SPContentTypeId(ContentTypeID); if (ct.CompareTo(ctId) == 0) { return(SearchMatchLevel.ITEM_BY_CT_ID_EXACTLY); } if ((IncludingChilds) && (ct.IsChildOf(ctId) || (ct.CompareTo(ctId) == 0))) { return(SearchMatchLevel.ITEM_BY_CT_ID_INHERITED); } } catch (Exception ex) { Logger.WriteTrace(ex, Logging.SeverityEnum.Error); } return(SearchMatchLevel.NONE); }