| 1234567891011121314151617181920212223242526272829303132333435363738 |
-
- using Microsoft.VisualBasic;
- namespace qdr.app.studiou.orders2printpack.ProductStorage
- {
- public class VariantDto : IIdentifierGetter
- {
- public string Name { get; set; } = string.Empty;
- public decimal Price { get; set; } = 0;
- public void CopyTo(VariantDto destination)
- {
- destination.Name = Name;
- destination.Price = Price;
- }
- public string GetIdentifier()
- {
- if (string.IsNullOrWhiteSpace(Name))
- return string.Empty;
-
- return Name.ToLower();
- }
- public override string ToString()
- {
- if (string.IsNullOrWhiteSpace(Name))
- return string.Empty;
- return Name.ToLower();
- }
- bool IEquatable<IIdentifierGetter>.Equals(IIdentifierGetter? other)
- {
- return other != null && other.GetIdentifier() == GetIdentifier();
- }
- }
-
- }
|