60 lines
894 B
C#
60 lines
894 B
C#
using Newtonsoft.Json;
|
|
using System;
|
|
|
|
namespace DrawGraph
|
|
{
|
|
[JsonObject(MemberSerialization.OptOut)]
|
|
[Serializable]
|
|
public class CodeTableItem : IEquatable<CodeTableItem>
|
|
{
|
|
private string srcVal = "";
|
|
|
|
private string descVal = "";
|
|
|
|
public string DescVal
|
|
{
|
|
get
|
|
{
|
|
return this.descVal;
|
|
}
|
|
set
|
|
{
|
|
this.descVal = value;
|
|
}
|
|
}
|
|
|
|
public string SrcVal
|
|
{
|
|
get
|
|
{
|
|
return this.srcVal;
|
|
}
|
|
set
|
|
{
|
|
this.srcVal = value;
|
|
}
|
|
}
|
|
|
|
public bool Equals(CodeTableItem other)
|
|
{
|
|
bool flag = other == null;
|
|
bool result;
|
|
if (flag)
|
|
{
|
|
result = false;
|
|
}
|
|
else
|
|
{
|
|
bool flag2 = this == other;
|
|
result = (flag2 || (this.srcVal.Equals(other.SrcVal) && this.descVal.Equals(other.DescVal)));
|
|
}
|
|
return result;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return this.srcVal.GetHashCode() + this.DescVal.GetHashCode();
|
|
}
|
|
}
|
|
}
|