Class RelationSavedNotification
A notification that is published when a relation has been saved.
Inheritance
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public class RelationSavedNotification : SavedNotification<IRelation>, IStatefulNotification, INotification
Constructors
View SourceRelationSavedNotification(IEnumerable<IRelation>, EventMessages)
Initializes a new instance of the RelationSavedNotification.
Declaration
public RelationSavedNotification(IEnumerable<IRelation> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IRelation> | target | Gets the collection of IRelation objects having been saved. |
| EventMessages | messages | Initializes a new instance of the EventMessages. |
RelationSavedNotification(IRelation, EventMessages)
Initializes a new instance of the RelationSavedNotification class with a single relation.
Declaration
public RelationSavedNotification(IRelation target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IRelation | target | The relation that was saved. |
| EventMessages | messages | The event messages collection. |
Properties
View SourceIsAutomatic
Gets or sets a value indicating whether the relations were saved automatically as a side-effect of content being saved (e.g. umbMedia, umbDocument, umbMember), rather than explicitly via IRelationService.
Declaration
public bool IsAutomatic { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
When true, the IRelation.Id of each saved entity may be 0
because automatic relations are persisted via a bulk operation that does not return
database identities. ParentId, ChildId,
and RelationType are always populated.