using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Laservall.Solidworks.Model { public class SwAssDocTreeModel { public string drawingNo { get; set; } public string docPath { get; set; } public string configName { get; set; } public int swMateCount { get; set; } public List children { get; set; } public bool isAss { get; set; } public bool isOutSourcing { get; set; } public int quantity { get; set; } public Dictionary props { get; set; } public string Props { get { //StringBuilder stringBuilder = new StringBuilder(); //if (props != null) //{ // foreach (KeyValuePair prop in props) // { // stringBuilder.AppendLine(prop.Key + ":" + prop.Value + ";"); // } //} //return stringBuilder.ToString(); return JsonConvert.SerializeObject(props); } } public override bool Equals(object obj) { if (obj == null) { return false; } if (!(obj is SwAssDocTreeModel swAssDocTreeModel)) { return false; } return drawingNo == swAssDocTreeModel.drawingNo; } public override int GetHashCode() { return drawingNo.GetHashCode(); } } }