Table of Contents

Class CartMessage

Namespace
Dynamicweb.Ecommerce.Frontend.Cart
Assembly
Dynamicweb.Ecommerce.dll

Represents a single message within a cart command result.

public sealed class CartMessage : ViewModelBase
Inheritance
CartMessage
Inherited Members
Extension Methods

Constructors

CartMessage(bool, CartResultType)

Initializes a new instance of the CartMessage class.

public CartMessage(bool isSuccess = true, CartResultType resultType = CartResultType.None)

Parameters

isSuccess bool

Whether this message represents success.

resultType CartResultType

The associated result type.

CartMessage(string?, string?, bool, CartResultType)

Initializes a new instance of the CartMessage class with all properties.

public CartMessage(string? id = null, string? name = null, bool isSuccess = true, CartResultType resultType = CartResultType.None)

Parameters

id string

The identifier related to this message.

name string

The name related to this message.

isSuccess bool

Whether this message represents success.

resultType CartResultType

The associated result type.

Properties

Count

Gets or sets the number of items this message represents (e.g., how many products were added).

public int? Count { get; set; }

Property Value

int?

Remarks

Only set when this message represents more than one item; in that case Id, Name, and Image are left unset rather than describing a single item.

Id

Gets or sets the identifier related to this message.

public string? Id { get; set; }

Property Value

string

Image

Gets or sets the image related to this message (e.g., the added product's image).

public ImageFileViewModel? Image { get; set; }

Property Value

ImageFileViewModel

IsSuccess

Gets or sets a value indicating whether this message represents a successful operation.

public bool IsSuccess { get; set; }

Property Value

bool

Name

Gets or sets the name related to this message (e.g., cart name, product name).

public string? Name { get; set; }

Property Value

string

ResultType

Gets or sets the result type associated with this message.

public CartResultType ResultType { get; set; }

Property Value

CartResultType
To top