Example #1
0
        public String ToString(IEntityEquals left, IPrintable printable)
        {
            StringBuilder sb = new StringBuilder();

            printable.ToString(sb);
            return(sb.ToString());
        }
Example #2
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());
        }
Example #3
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()));
        }
Example #4
0
 public void ToString(IEntityEquals left, StringBuilder sb)
 {
     sb.Append(left.Get__BaseType().FullName).Append('-');
     StringBuilderUtil.AppendPrintable(sb, left.Get__Id());
 }