public override int GetHashCode()
        {
            int result = Name.GetHashCode();

            if (ConverterType != null)
            {
                result ^= ConverterType.GetHashCode();
            }
            if (TargetType != null)
            {
                result ^= TargetType.GetHashCode();
            }
            return(result);
        }
Exemple #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Path != null ? Path.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)BindingMode;
         hashCode = (hashCode * 397) ^ AncestorLevel;
         hashCode = (hashCode * 397) ^ (AncestorType != null ? AncestorType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ConverterType != null ? ConverterType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)RelativeSourceMode;
         hashCode = (hashCode * 397) ^ (ConverterParameter != null ? ConverterParameter.GetHashCode() : 0);
         return(hashCode);
     }
 }
        public override int GetHashCode()
        {
            var ret = ConverterType != null?ConverterType.GetHashCode() : 0;

            ret <<= 5;
            if (TargetType != null)
            {
                ret += TargetType.GetHashCode();
            }
            ret <<= 5;
            if (Name != null)
            {
                ret += Name.GetHashCode();
            }
            return(ret);
        }