using System.Windows.Media; namespace BS.Shared.DataContracts { public partial class TextbausteinDC : IFilterableDC { public override bool Equals(object obj) { if (obj is TextbausteinDC y) { if(TextbausteinOid is null && y.TextbausteinOid is null) { return GetHashCode() == y.GetHashCode(); } if (TextbausteinOid.HasValue && y.TextbausteinOid.HasValue) { 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; public string IconPath { get; private set; } public string SimpleDescription => Name; public bool SupportsActivationType { get; private set; } public long Version { get => TextbausteinVersion ?? 0; set => TextbausteinVersion = value; } public SolidColorBrush FilterableBrush => new SolidColorBrush(Colors.Transparent); } }