/// <summary>Notify subscribers that an item is to be saved.</summary> /// <param name="itemToBeSaved">The item that is to be saved.</param> /// <returns>True if the item was modified.</returns> public bool NotifySaving(ContentItem itemToBeSaved) { if (ItemSaving == null) return false; var args = new NotifiableItemEventArgs(itemToBeSaved); ItemSaving(this, args); return args.WasModified; }
/// <summary>Notify subscribers that an item was loaded or created.</summary> /// <param name="newlyCreatedItem">The item that was loaded or created.</param> /// <returns>True if the item was modified.</returns> public bool NotifiyCreated(ContentItem newlyCreatedItem) { if (ItemCreated == null) return false; NotifiableItemEventArgs args = new NotifiableItemEventArgs(newlyCreatedItem); ItemCreated(this, args); return args.WasModified; }
/// <summary>Notify subscribers that an item is to be saved.</summary> /// <param name="itemToBeSaved">The item that is to be saved.</param> /// <returns>True if the item was modified.</returns> public bool NotifySaving(ContentItem itemToBeSaved) { if (ItemSaving == null) { return(false); } var args = new NotifiableItemEventArgs(itemToBeSaved); ItemSaving(this, args); return(args.WasModified); }
/// <summary>Notify subscribers that an item was loaded or created.</summary> /// <param name="newlyCreatedItem">The item that was loaded or created.</param> /// <returns>True if the item was modified.</returns> public bool NotifiyCreated(ContentItem newlyCreatedItem) { if (ItemCreated == null) { return(false); } NotifiableItemEventArgs args = new NotifiableItemEventArgs(newlyCreatedItem); ItemCreated(this, args); return(args.WasModified); }
void notifier_ItemCreated(object sender, NotifiableItemEventArgs e) { e.WasModified = FilfilDependencies(e.AffectedItem); }