Class Standard.Paragraph.ParagraphModuleNotificationArgs
- Namespace
- Dynamicweb.Notifications
- Assembly
- Dynamicweb.dll
Provides information about the module which has been attached to/detached from the paragraph.
public class Standard.Paragraph.ParagraphModuleNotificationArgs : NotificationArgs
- Inheritance
-
Standard.Paragraph.ParagraphModuleNotificationArgs
- Inherited Members
Examples
using Dynamicweb.Extensibility.Notifications;
namespace Dynamicweb.Examples.Notifications.Standard;
[Subscribe(Dynamicweb.Notifications.Standard.Paragraph.ModuleAttached)]
public class ParagraphModuleAttachedObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
if (args is null)
return;
if (args is not Dynamicweb.Notifications.Standard.Paragraph.ParagraphModuleNotificationArgs)
return;
var item = (Dynamicweb.Notifications.Standard.Paragraph.ParagraphModuleNotificationArgs)args;
//Pass attached module name to the notification e-mail
string emailBody = $"The module ({item.ModuleSystemName}) has been attached.";
}
}
Remarks
Arguments passed to: Dynamicweb.Notifications.Standard.Paragraph.ModuleAttached notification, Dynamicweb.Notifications.Standard.Paragraph.ModuleDetached notification
Constructors
ParagraphModuleNotificationArgs(Paragraph, string?)
Initializes a new instance of an object.
public ParagraphModuleNotificationArgs(Paragraph target, string? moduleSystemName)
Parameters
targetParagraphTarget paragraph.
moduleSystemNamestringModule system name which has been attached/detached.
Properties
ModuleSystemName
Gets the module system name which has been attached/detached.
public string? ModuleSystemName { get; }
Property Value
Target
Gets the target paragraph.
public Paragraph Target { get; }