Files
BeWoPlaner/Shared/DataContracts/DepotRhythmusDC.cs
2016-06-27 01:45:38 +02:00

46 lines
1.1 KiB
C#

using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
{
[DataContract]
public class DepotRhythmusDC
{
[DataMember]
public string Bezeichnung { get; set; }
[DataMember]
public int? Wert { get; set; }
[DataMember]
public long? DepotRhythmusformOid { get; set; }
[DataMember]
public long? DepotRhythmusformVersion { get; set; }
public override bool Equals(object obj)
{
if (!(obj is DepotRhythmusDC)) return false;
var y = (DepotRhythmusDC)obj;
if (DepotRhythmusformOid == null && y.DepotRhythmusformOid == null)
return GetHashCode() == y.GetHashCode();
if (DepotRhythmusformOid != null && y.DepotRhythmusformOid != null)
return DepotRhythmusformOid == y.DepotRhythmusformOid;
return Bezeichnung.Equals(y.Bezeichnung) && Wert.Equals(y.Wert);
}
public override int GetHashCode()
{
return DepotRhythmusformOid.HasValue
? GetType().Name.GetHashCode() ^ DepotRhythmusformOid.GetHashCode()
: base.GetHashCode();
}
public override string ToString()
{
return Bezeichnung;
}
}
}