Ejemplo n.º 1
0
        public int GetHashCode(IEntityEquals left)
        {
            Object id = left.Get__Id();

            if (id == null)
            {
                return(RuntimeHelpers.GetHashCode(left));
            }
            return(left.Get__BaseType().GetHashCode() ^ id.GetHashCode());
        }
Ejemplo n.º 2
0
        public bool Equals(IEntityEquals left, Object right)
        {
            if (right == left)
            {
                return(true);
            }
            if (!(right is IEntityEquals))
            {
                return(false);
            }
            Object id = left.Get__Id();

            if (id == null)
            {
                // Null id can never be equal with something other than itself
                return(false);
            }
            IEntityEquals other = (IEntityEquals)right;

            return(id.Equals(other.Get__Id()) && left.Get__BaseType().Equals(other.Get__BaseType()));
        }
Ejemplo n.º 3
0
 public void ToString(IEntityEquals left, StringBuilder sb)
 {
     sb.Append(left.Get__BaseType().FullName).Append('-');
     StringBuilderUtil.AppendPrintable(sb, left.Get__Id());
 }