예제 #1
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.id)
            {
                hashcode = (hashcode * 397) + Id.GetHashCode();
            }
            if (__isset.channelId)
            {
                hashcode = (hashcode * 397) + ChannelId.GetHashCode();
            }
            if (__isset.lastSeq)
            {
                hashcode = (hashcode * 397) + LastSeq.GetHashCode();
            }
            if (__isset.unreadCount)
            {
                hashcode = (hashcode * 397) + UnreadCount.GetHashCode();
            }
            if (__isset.lastModifiedTime)
            {
                hashcode = (hashcode * 397) + LastModifiedTime.GetHashCode();
            }
            if (__isset.status)
            {
                hashcode = (hashcode * 397) + Status.GetHashCode();
            }
            if (__isset.midType)
            {
                hashcode = (hashcode * 397) + MidType.GetHashCode();
            }
            if (__isset.lastMessages)
            {
                hashcode = (hashcode * 397) + TCollections.GetHashCode(LastMessages);
            }
        }
        return(hashcode);
    }
예제 #2
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("TMessageBox(");
        bool __first = true;

        if (Id != null && __isset.id)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Id: ");
            Id.ToString(sb);
        }
        if (ChannelId != null && __isset.channelId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ChannelId: ");
            ChannelId.ToString(sb);
        }
        if (__isset.lastSeq)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LastSeq: ");
            LastSeq.ToString(sb);
        }
        if (__isset.unreadCount)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("UnreadCount: ");
            UnreadCount.ToString(sb);
        }
        if (__isset.lastModifiedTime)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LastModifiedTime: ");
            LastModifiedTime.ToString(sb);
        }
        if (__isset.status)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Status: ");
            Status.ToString(sb);
        }
        if (__isset.midType)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("MidType: ");
            MidType.ToString(sb);
        }
        if (LastMessages != null && __isset.lastMessages)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("LastMessages: ");
            LastMessages.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }