Class Commenting
- Namespace
- Dynamicweb.Notifications
- Assembly
- Dynamicweb.dll
Notifications for comment module
[Obsolete("Use CommentNotification class instead")]
public sealed class Commenting
- Inheritance
-
Commenting
- Inherited Members
Fields
OnAfterComment
On after comment notification. Occurs on submit of new comments - after the data is in the Comment instance
public const string OnAfterComment = "OnAfterComment"
Field Value
Examples
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Notifications;
namespace Dynamicweb.Examples.Notifications
{
[Subscribe(CommentNotification.OnAfterComment)]
public class OnAfterCommentObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
var commentArgs = args as CommentNotification.CommentArgs;
//Add code here
}
}
}
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Commenting.CommentArgs
OnAfterSave
Comment after save notification. Occurs just after a comment is saved
public const string OnAfterSave = "OnAfterSave"
Field Value
Examples
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Notifications;
namespace Dynamicweb.Examples.Notifications
{
[Subscribe(CommentNotification.OnAfterSave)]
public class OnAfterSaveObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
var commentArgs = args as CommentNotification.CommentArgs;
//Add code here
}
}
}
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Commenting.CommentArgs
OnBeforeComment
On before comment notification. Occurs on submit of new comments - before the data is saved
public const string OnBeforeComment = "OnBeforeComment"
Field Value
Examples
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Notifications;
namespace Dynamicweb.Examples.Notifications
{
[Subscribe(CommentNotification.OnBeforeComment)]
public class OnBeforeCommentObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
var commentArgs = args as CommentNotification.CommentArgs;
//Add code here
}
}
}
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Commenting.CommentArgs
OnBeforeRenderComment
Comment before rendering notification. Occurs just before a comment is rendered in the list
public const string OnBeforeRenderComment = "CommentOnBeforeRenderComment"
Field Value
Examples
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Notifications;
namespace Dynamicweb.Examples.Notifications
{
[Subscribe(CommentNotification.OnBeforeRenderComment)]
public class OnBeforeRenderCommentObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
var onBeforeRenderCommentArgs = args as CommentNotification.OnBeforeRenderCommentArgs;
//Add code here
}
}
}
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Commenting.OnBeforeRenderCommentArgs
OnBeforeRenderComments
Comments before rendering notification. Occurs just before comments are rendered
public const string OnBeforeRenderComments = "CommentOnBeforeRenderComments"
Field Value
Examples
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Notifications;
namespace Dynamicweb.Examples.Notifications
{
[Subscribe(CommentNotification.OnBeforeRenderComments)]
public class OnBeforeRenderCommentsObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
var onBeforeRenderCommentsArgs = args as CommentNotification.OnBeforeRenderCommentsArgs;
//Add code here
}
}
}
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Commenting.OnBeforeRenderCommentsArgs
OnBeforeSave
Comment before save notification. Occurs just before a comment is saved
public const string OnBeforeSave = "OnBeforeSave"
Field Value
Examples
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Notifications;
namespace Dynamicweb.Examples.Notifications
{
[Subscribe(CommentNotification.OnBeforeSave)]
public class OnBeforeSaveObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
var commentArgs = args as CommentNotification.CommentArgs;
//Add code here
}
}
}
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Commenting.CommentArgs