84 lines
2.1 KiB
C#
84 lines
2.1 KiB
C#
using EgwCoreLib.Utils;
|
|
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;
|
|
|
|
/// <summary>
|
|
/// Dizionario Shape da verifica JWD
|
|
/// </summary>
|
|
public Dictionary<int,string> DictShape { get; set; } = new Dictionary<int, string>();
|
|
|
|
/// <summary>
|
|
/// XML opzioni HW da verifica JWD
|
|
/// </summary>
|
|
public string OptionsXml { 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;
|
|
if (OptionsXml != item.OptionsXml)
|
|
return false;
|
|
if (!DictUtils.DictAreEqual(DictShape, item.DictShape))
|
|
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
|
|
}
|
|
} |