Table of Contents

Class ConsentNotification

Namespace
Dynamicweb.DataProcessing.Notifications
Assembly
Dynamicweb.Core.dll

Notifications for consents.

public sealed class ConsentNotification
Inheritance
ConsentNotification
Inherited Members

Fields

Given

This notification is fired when a consent is given.

public const string Given = "DWN_DATAPROCESSING_CONSENT_GIVEN"

Field Value

string

Examples

using Dynamicweb.DataProcessing.Notifications;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.DataProcessing.Examples.Notifications
{
    [Subscribe(ConsentNotification.Given)]
    public class ConsentGivenNotificationSubscriber : NotificationSubscriber
    {
        public override void OnNotify(string notification, NotificationArgs args)
        {
            var consentArgs = (ConsentNotificationArgs)args;

            var consent = consentArgs.Consent;

            // Do stuff
        }
    }
}

Withdrawn

This notification is fired when a consent is withdrawn.

public const string Withdrawn = "DWN_DATAPROCESSING_CONSENT_WITHDRAWN"

Field Value

string

Examples

using Dynamicweb.DataProcessing.Notifications;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.DataProcessing.Examples.Notifications
{
    [Subscribe(ConsentNotification.Withdrawn)]
    public class ConsentWithdrawnNotificationSubscriber : NotificationSubscriber
    {
        public override void OnNotify(string notification, NotificationArgs args)
        {
            var consentArgs = (ConsentNotificationArgs)args;

            var consent = consentArgs.Consent;

            // Do stuff
        }
    }
}
To top