//Determines if the resolver should trigger anything, it checks the event, the type of provider triggereing it //and checks if the item has any properties that matches the aliases public override bool ShouldExecute(Umbraco.Courier.Core.Item item, Umbraco.Courier.Core.Enums.ItemEvent itemEvent) { if (item.GetType() == typeof(ContentPropertyData) && itemEvent == Umbraco.Courier.Core.Enums.ItemEvent.Packaging) { ContentPropertyData cpd = (ContentPropertyData)item; return(cpd.Data.Where(x => companyProperties.Contains(x.Alias)).Count() > 0); } return(false); }
public override bool ShouldExecute(Item item, Umbraco.Courier.Core.Enums.ItemEvent itemEvent) { if (item.GetType() == typeof(ContentPropertyData)) { ContentPropertyData cpd = (ContentPropertyData)item; foreach (var cp in cpd.Data) { if (cp.Value != null && macroDataTypes.Contains(cp.PropertyEditorAlias.ToLower())) { return(true); } } } return(false); }