Class ScriptSavingNotification
Notification that is published before a script file is saved.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public class ScriptSavingNotification : SavingNotification<IScript>, IStatefulNotification, ICancelableNotification, INotification
Remarks
This notification is cancelable, allowing handlers to prevent the save operation. The notification is published by the IFileService before the script is persisted.
Constructors
View SourceScriptSavingNotification(IEnumerable<IScript>, EventMessages)
Initializes a new instance of the ScriptSavingNotification class with multiple scripts.
Declaration
public ScriptSavingNotification(IEnumerable<IScript> target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IScript> | target | The collection of scripts being saved. |
| EventMessages | messages | The event messages collection. |
ScriptSavingNotification(IScript, EventMessages)
Initializes a new instance of the ScriptSavingNotification class with a single script.
Declaration
public ScriptSavingNotification(IScript target, EventMessages messages)
Parameters
| Type | Name | Description |
|---|---|---|
| IScript | target | The script being saved. |
| EventMessages | messages | The event messages collection. |