Table of Contents

Class OrderDebuggingInfo

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll

Represents information about debugging.

public class OrderDebuggingInfo
Inheritance
OrderDebuggingInfo
Inherited Members

Examples

using Dynamicweb.Ecommerce.Orders;

namespace Dynamicweb.Ecommerce.Examples.Orders
{
    class OrderLoggerSample
    {
        public static void LogEvent(Order order, string message, params object[] @params)
        {
            string orderId = null;
            if (order == null || string.IsNullOrEmpty(order.Id))
            {
                orderId = "<No order>";
            }
            else
            {
                orderId = order.Id;
            }
            string printedMessage = $"Order {orderId}: {string.Format(message, @params)}";

            //save debugging info on the order
            if (order != null)
            {
                var info = new OrderDebuggingInfo(order, printedMessage, "CheckoutHandler");
                Services.OrderDebuggingInfos.Save(info);
            }
        }
    }
}

Constructors

OrderDebuggingInfo(Order, string, string)

Initializes a new instance of OrderDebuggingInfo.

public OrderDebuggingInfo(Order order, string message, string source)

Parameters

order Order
message string
source string

OrderDebuggingInfo(Order, string, string, DebuggingInfoType)

Initializes a new instance of OrderDebuggingInfo.

public OrderDebuggingInfo(Order order, string message, string source, DebuggingInfoType infoType)

Parameters

order Order
message string
source string
infoType DebuggingInfoType

Properties

InfoType

Gets the info type.

public DebuggingInfoType InfoType { get; set; }

Property Value

DebuggingInfoType

The info type.

Message

Gets the message.

public string Message { get; set; }

Property Value

string

The message.

OrderAutoId

Gets order auto id.

public int? OrderAutoId { get; set; }

Property Value

int?

The order auto id.

OrderId

Gets order id.

public string OrderId { get; set; }

Property Value

string

The order id.

Source

Gets the source.

public string Source { get; set; }

Property Value

string

The info source.

Time

Gets time.

public DateTime Time { get; set; }

Property Value

DateTime

The time.

To top