2021-12-03 12:57:22 +03:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Rehau.Sku.Assist
|
2021-11-29 11:26:25 +03:00
|
|
|
|
{
|
|
|
|
|
public class Product : IProduct
|
|
|
|
|
{
|
|
|
|
|
public string Sku { get; }
|
|
|
|
|
public string Name { get; }
|
2021-12-03 12:57:22 +03:00
|
|
|
|
public Uri Uri { get; }
|
2021-11-29 11:26:25 +03:00
|
|
|
|
|
|
|
|
|
public Product(string sku, string name)
|
|
|
|
|
{
|
|
|
|
|
Sku = sku;
|
|
|
|
|
Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-03 12:57:22 +03:00
|
|
|
|
public Product(string sku, string name, string uri)
|
|
|
|
|
{
|
|
|
|
|
Sku = sku;
|
|
|
|
|
Name = name;
|
|
|
|
|
Uri = new Uri(uri);
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-29 11:26:25 +03:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return $"{this.Name} ({this.Sku})";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|