Click or drag to resize

CommunicationOnErpCommunicationRestored Field

Occurs after the connection with the ERP is restored.

Namespace:  Dynamicweb.Ecommerce.LiveIntegration.Notifications
Assembly:  Dynamicweb.Ecommerce.LiveIntegration (in Dynamicweb.Ecommerce.LiveIntegration.dll) Version: 3.0.1
Syntax
public const string OnErpCommunicationRestored = "Dynamicweb.Ecommerce.LiveIntegration.Notifications.LiveIntegration.OnErpCommunicationRestored"

Field Value

Type: String
Examples
C#
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Ecommerce.LiveIntegration.Notifications;

namespace Dynamicweb.Ecommerce.LiveIntegration.Examples.Notifications
{    
    /// <summary>
    /// Class CommunicationRestoredSubscriber.
    /// </summary>
    /// <seealso cref="NotificationSubscriber" />
    [Subscribe(Communication.OnErpCommunicationRestored)]
    public class CommunicationRestoredSubscriber : NotificationSubscriber
    {
        /// <summary>
        /// Call to invoke observer.
        /// </summary>
        /// <param name="notification">The notification.</param>
        /// <param name="args">The args.</param>
        public override void OnNotify(string notification, NotificationArgs args)
        {
            var myArgs = (Communication.OnErpCommunicationRestoredArgs)args;

            // TODO: Add code here
            if (myArgs != null)
            {
                Logging.Logger.Instance.Log(Logging.ErrorLevel.DebugInfo, "Connection restored");
            }
        }
    }
}
See Also