Class OrderDebuggingInfo
- Namespace
- Dynamicweb.Ecommerce.Orders
- Assembly
- Dynamicweb.Ecommerce.dll
Represents information about debugging.
- Inheritance
-
Order
Debugging Info
- 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 Order
Parameters
OrderDebuggingInfo(Order, string, string, DebuggingInfoType)
Initializes a new instance of Order
Parameters
order
Ordermessage
stringsource
stringinfoType
DebuggingInfo Type
Properties
InfoType
Gets the info type.
Property Value
- Debugging
Info Type The info type.
Message
Gets the message.
Property Value
- string
The message.
OrderAutoId
Gets order auto id.
Property Value
- int?
The order auto id.
OrderId
Gets order id.
Property Value
- string
The order id.
Source
Gets the source.
Property Value
- string
The info source.
Time
Gets time.
Property Value
- Date
Time The time.