CommunicationOnBeforeErpCommunication Field |
Namespace: Dynamicweb.Ecommerce.LiveIntegration.Notifications
public const string OnBeforeErpCommunication = "Dynamicweb.Ecommerce.LiveIntegration.Notifications.LiveIntegration.OnBeforeErpCommunication"
using Dynamicweb.Ecommerce.LiveIntegration.Notifications; using Dynamicweb.Extensibility.Notifications; namespace Dynamicweb.Ecommerce.LiveIntegration.Examples.Notifications { /// <summary> /// Class CommunicationBeforeSendRequestSubscriber. /// </summary> /// <seealso cref="NotificationSubscriber" /> [Subscribe(Communication.OnBeforeErpCommunication)] public class CommunicationBeforeSendRequestSubscriber : 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.OnBeforeErpCommunicationArgs)args; if (!string.IsNullOrEmpty(myArgs?.Request)) { Logging.Logger.Instance.Log(Logging.ErrorLevel.DebugInfo, myArgs.Request); } } } }