umbraco documentation composer component code example
Example: umbraco 8 composer
public void Initialize()
{
// subscribe to content service published event
ContentService.Published += ContentService_Published;
}
private void ContentService_Published(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.ContentPublishedEventArgs e)
{
// the custom code to fire everytime content is published goes here!
}