年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

115 lines
3.0 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KGIS.Plugin.LayerProperty.Utils
{
public class ItemInfo<TKey, TValue>
{
private TKey innerValue;
private TValue displayValue;
public TKey InnerValue
{
get
{
return this.innerValue;
}
private set
{
this.innerValue = value;
}
}
public TValue DisplayValue
{
get
{
return this.displayValue;
}
private set
{
this.displayValue = value;
}
}
private ItemInfo()
{
}
public ItemInfo(TKey innervalue, TValue displayvalue)
{
this.InnerValue = innervalue;
this.DisplayValue = displayvalue;
}
public override string ToString()
{
TValue tValue = this.DisplayValue;
return tValue.ToString();
}
public static bool operator ==(ItemInfo<TKey, TValue> param0, ItemInfo<TKey, TValue> param1)
{
object obj2 = param0;
object obj3 = param1;
if ((obj2 == null) && (obj3 == null))
{
return true;
}
if (obj2 == null)
{
return false;
}
if (obj3 == null)
{
return false;
}
if ((param0.innerValue == null) && (param1.innerValue == null))
{
return true;
}
if (param0.innerValue == null)
{
return false;
}
if (param1.innerValue == null)
{
return false;
}
return param0.InnerValue.Equals(param1.InnerValue);
}
public static bool operator !=(ItemInfo<TKey, TValue> param0, ItemInfo<TKey, TValue> param1)
{
object obj2 = param0;
object obj3 = param1;
if ((obj2 == null) && (obj3 == null))
{
return false;
}
if (obj2 == null)
{
return true;
}
if (obj3 == null)
{
return true;
}
if ((param0.innerValue == null) && (param1.innerValue == null))
{
return false;
}
return ((param0.innerValue == null) || ((param1.innerValue == null) || !param0.InnerValue.Equals(param1.InnerValue)));
}
public bool Equals(ItemInfo<TKey, TValue> item)
{
return this == item;
}
[Obsolete("不要使用此方法")]
private new bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}