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 == null)
return;
if (!(args is Dynamicweb.Notifications.Standard.Paragraph.ParagraphModuleNotificationArgs))
return;
var item = (Dynamicweb.Notifications.Standard.Paragraph.ParagraphModuleNotificationArgs) args;
//Pass attached module name to the notification e-mail
var emailBody = string.Format("The module ({0}) has been attached.", item.ModuleSystemName);
}
}
}
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
target
ParagraphTarget paragraph.
moduleSystemName
stringModule 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; }