Skip to content

ResponsiveImage

// RB2 Core Connect
namespace CoreConnect.Commerce.Core;
/// <summary>
/// Represents product images in customer's wishlist or cart.
/// </summary>
public record ResponsiveImage
{
public ResponsiveImage(string? urlThumbnail = null, string? urlOriginal = null, string? altText = null, int? width = null, int? height = null, List<ResponsiveImageAlternative>? alternativeSizes = null)
{
UrlThumbnail = urlThumbnail;
UrlOriginal = urlOriginal;
AltText = altText;
Width = width;
Height = height;
AlternativeSizes = alternativeSizes;
}
public string? UrlThumbnail { get; set; }
public string? UrlOriginal { get; set; }
public string? AltText { get; set; }
public int? Width { get; set; }
public int? Height { get; set; }
public List<ResponsiveImageAlternative>? AlternativeSizes { get; set; }
}
/// <summary>
/// Represents alternative images.
/// </summary>
public record ResponsiveImageAlternative
{
public ResponsiveImageAlternative(string type, string url)
{
Type = type;
Url = url;
}
public string Type { get; set; }
public string Url { get; set; }
}