Files
BeWoPlaner/Shared/DataContracts/ClientPartials/TextbausteinDC.cs

50 lines
1.4 KiB
C#
Raw Normal View History

2017-11-17 22:24:00 +01:00
using System.Windows.Media;
namespace BS.Shared.DataContracts
{
public partial class TextbausteinDC : IFilterableDC
{
public override bool Equals(object obj)
{
if (obj is TextbausteinDC y)
2017-11-17 22:24:00 +01:00
{
if(TextbausteinOid is null && y.TextbausteinOid is null)
2017-11-17 22:24:00 +01:00
{
return GetHashCode() == y.GetHashCode();
}
if (TextbausteinOid.HasValue && y.TextbausteinOid.HasValue)
2017-11-17 22:24:00 +01:00
{
return TextbausteinOid == y.TextbausteinOid;
}
}
return false;
}
public override int GetHashCode()
{
return GetType().Name.GetHashCode() ^ TextbausteinOid.GetHashCode();
}
public override string ToString()
{
return Name;
}
public ActivationTypeId ActivationType { get; set; }
public string DetailDescription => Text;
public string FilterRelevants => Name + Text;
2017-11-17 22:24:00 +01:00
public string IconPath { get; private set; }
public string SimpleDescription => Name;
2017-11-17 22:24:00 +01:00
public bool SupportsActivationType { get; private set; }
public long Version
{
get => TextbausteinVersion ?? 0;
set => TextbausteinVersion = value;
2017-11-17 22:24:00 +01:00
}
public SolidColorBrush FilterableBrush => new SolidColorBrush(Colors.Transparent);
2017-11-17 22:24:00 +01:00
}
}