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)
            {
                OrderDebuggingInfo.Save(order, printedMessage, "CheckoutHandler");
            }
        }
    }
}

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

OrderDebuggingInfo(int)

Initializes a new instance of the OrderDebuggingInfo class.
[Obsolete("Use constructor with order instance instead.")]
public OrderDebuggingInfo(int orderAutoId)

Parameters

orderAutoId int

OrderDebuggingInfo(string)

Initializes a new instance of the OrderDebuggingInfo class.
[Obsolete("Use constructor with order instance instead.")]
public OrderDebuggingInfo(string orderId)

Parameters

orderId string

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.

Methods

GetAllRecurringOrderEntries(DateTime?, DateTime?, string)

Get all
[Obsolete("Use Services.OrderDebuggingInfos.GetBySearch instead.")]
public static List<OrderDebuggingInfo> GetAllRecurringOrderEntries(DateTime? startDate, DateTime? enddate, string id)

Parameters

startDate DateTime?
enddate DateTime?
id string

Returns

List<OrderDebuggingInfo>

GetAllRecurringOrderErrors(DateTime?, DateTime?, string)

Get all recurring order errors.
[Obsolete("Use Services.OrderDebuggingInfos.GetBySearch instead.")]
public static List<OrderDebuggingInfo> GetAllRecurringOrderErrors(DateTime? startDate, DateTime? endDate, string id)

Parameters

startDate DateTime?
endDate DateTime?
id string

Returns

List<OrderDebuggingInfo>

GetByInfoType(string, DebuggingInfoType)

Get the order debugging info by order Id and information type.
[Obsolete("Use Services.OrderDebuggingInfos.GetBySearch instead.")]
public static List<OrderDebuggingInfo> GetByInfoType(string orderId, DebuggingInfoType infoType)

Parameters

orderId string
The Order Id.
infoType DebuggingInfoType
The info type.

Returns

List<OrderDebuggingInfo>
The list of the OrderDebuggingInfo objects.

GetByOrderAutoId(int)

Get the order debugging info by order auto Id.
[Obsolete("Use Services.OrderDebuggingInfos.GetByOrderAutoId instead.")]
public static List<OrderDebuggingInfo> GetByOrderAutoId(int orderAutoId)

Parameters

orderAutoId int
The Order auto Id.

Returns

List<OrderDebuggingInfo>
The list of the OrderDebuggingInfo objects.

GetByOrderId(string)

Get the order debugging info by order Id.
[Obsolete("Use Services.OrderDebuggingInfos.GetByOrderId instead.")]
public static List<OrderDebuggingInfo> GetByOrderId(string orderId)

Parameters

orderId string
The Order Id.

Returns

List<OrderDebuggingInfo>
The list of the OrderDebuggingInfo objects.

GetByRecurringOrderId(int)

Get the order debugging info by recurring order Id.
[Obsolete("Use Services.OrderDebuggingInfos.GetByRecurringOrderId instead.")]
public static List<OrderDebuggingInfo> GetByRecurringOrderId(int recurringOrderId)

Parameters

recurringOrderId int
The recurring order Id.

Returns

List<OrderDebuggingInfo>
The list of the OrderDebuggingInfo objects.

GetBySavedCardId(int)

Get the order debugging info by saved Card Id.
[Obsolete("Use Services.OrderDebuggingInfos.GetBySavedCardId instead.")]
public static List<OrderDebuggingInfo> GetBySavedCardId(int savedCardId)

Parameters

savedCardId int
The saved Card Id.

Returns

List<OrderDebuggingInfo>
The list of the OrderDebuggingInfo objects.

GetCountByRecurringOrderId(int)

Get count of the order debugging info for specified recurring order Id.
[Obsolete("Use Services.OrderDebuggingInfos.GetCountByRecurringOrderId instead.")]
public static int GetCountByRecurringOrderId(int recurringOrderId)

Parameters

recurringOrderId int
The recurring order Id.

Returns

int
Get count of the order debugging info.

GetCountBySavedCardId(int)

Get count of the order debugging info for specified saved Card Id.
[Obsolete("Use Services.OrderDebuggingInfos.GetCountBySavedCardId instead.")]
public static int GetCountBySavedCardId(int savedCardId)

Parameters

savedCardId int
The saved Card Id.

Returns

int
Get count of the order debugging info.

GetFirstInfoByOrderId(string)

Gets the first order debugging info for the passed order id so the auto id can be retrieved
[Obsolete("Use Services.OrderDebuggingInfos.GetFirstInfoByOrderId instead.")]
public static OrderDebuggingInfo GetFirstInfoByOrderId(string orderId)

Parameters

orderId string
The Order Id.

Returns

OrderDebuggingInfo
AOrderDebuggingInfo instance.

Save()

Saves the instance of the OrderDebuggingInfo into DB
[Obsolete("Use Services.OrderDebuggingInfos.Save instead.")]
public void Save()

Save(Order, DateTime, string, string, DebuggingInfoType)

Saves the order debugging info into DB.
[Obsolete("Use Services.OrderDebuggingInfos.Save instead.")]
public static void Save(Order order, DateTime time, string message, string source, DebuggingInfoType infoType)

Parameters

order Order
The Order.
time DateTime
The time of.
message string
The message.
source string
The message source.
infoType DebuggingInfoType
The debug info type.

Save(Order, string, string)

Saves the order debugging info into DB.
[Obsolete("Use Services.OrderDebuggingInfos.Save instead.")]
public static void Save(Order order, string message, string source)

Parameters

order Order
The Order.
message string
The message.
source string
The message source.
To top