69 lines
1.6 KiB
C#
69 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WebWindowComplex.DTO
|
|
{
|
|
/// <summary>
|
|
/// Dati specifici ricevuto dal chiamante x display e calcoli
|
|
/// </summary>
|
|
public class LivePayload
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// JWD Corrente
|
|
/// </summary>
|
|
public string CurrJwd { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Preview SVG
|
|
/// </summary>
|
|
public string SvgPreview { get; set; } = string.Empty;
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Public Methods
|
|
|
|
/// <summary>
|
|
/// Override metodo di equality
|
|
/// </summary>
|
|
/// <param name="obj"></param>
|
|
/// <returns></returns>
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (!(obj is LivePayload item))
|
|
return false;
|
|
|
|
if (CurrJwd != item.CurrJwd)
|
|
return false;
|
|
if (SvgPreview != item.SvgPreview)
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Override hash method
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public override int GetHashCode()
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Verifica di validità del Payload (solo jwd)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public bool IsValid()
|
|
{
|
|
bool jwdOK = !string.IsNullOrEmpty(CurrJwd);
|
|
return jwdOK;
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |