Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = (MappingSourceType != null ? MappingSourceType.GetHashCode() : 0);
         result = (result * 397) ^ (MappingTargetType != null ? MappingTargetType.GetHashCode() : 0);
         result = (result * 397) ^ (MapIntoExistingTargetInstance.GetHashCode());
         return(result);
     }
 }
Ejemplo n.º 2
0
        public int CompareTo(MappingInfo other)
        {
            if (other == null)
            {
                return(1);
            }
            if (ReferenceEquals(other, this))
            {
                return(0);
            }
            var result = MappingSourceType.ToString().CompareTo(other.MappingSourceType.ToString());

            if (result != 0)
            {
                return(result);
            }
            result = MappingTargetType.ToString().CompareTo(other.MappingTargetType.ToString());
            if (result != 0)
            {
                return(result);
            }
            result = mapIntoExistingTargetInstance.CompareTo(other.mapIntoExistingTargetInstance);
            return(result);
        }