Dynamicweb 8 Documentation
NotificationSubscriber Class
Members  Example 

Base implementation of notification subscribers.
Syntax
'Declaration
 
Public MustInherit Class NotificationSubscriber 
public abstract class NotificationSubscriber 
Example
//Create notification
 Dynamicweb.Extensibility.NotificationManager.Notify("MY_NOTIFICATION", new string[] { "my notification" });
 ...
 //How to subscribe to notification
 [Dynamicweb.Extensibility.Subscribe("MY_NOTIFICATION")]
    public class MyObserver : Dynamicweb.Extensibility.NotificationSubscriber
    {
        public override void OnNotify(string notification, object[] args)
        {
            if (args == null || args.Length != 1)
                return;
 
        Class1.vb    string message = (string)args[0];
 
            Dynamicweb.Base.WriteEventLog(message, System.Diagnostics.EventLogEntryType.Information);
        }
    }
Inheritance Hierarchy

System.Object
   Dynamicweb.Extensibility.NotificationSubscriber
      Dynamicweb.eCommerce.Frontend.Cart.EcomCartDeletedObserver
      Dynamicweb.eCommerce.Frontend.Cart.EcomCartLineAddedObserver
      Dynamicweb.eCommerce.Frontend.Cart.SavedForLaterObserver
      Dynamicweb.eCommerce.Frontend.EcomPageLoadNotificationSubscriber
      Dynamicweb.Extensibility.Provider.ProductListProvider
      Dynamicweb.Modules.UserManagement.AutoLoginNotificationSubscriber

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

NotificationSubscriber Members
Dynamicweb.Extensibility Namespace

Send Feedback