Esempio n. 1
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.productId)
            {
                hashcode = (hashcode * 397) + ProductId.GetHashCode();
            }
            if (__isset.packageId)
            {
                hashcode = (hashcode * 397) + PackageId.GetHashCode();
            }
            if (__isset.version)
            {
                hashcode = (hashcode * 397) + Version.GetHashCode();
            }
            if (__isset.onSale)
            {
                hashcode = (hashcode * 397) + OnSale.GetHashCode();
            }
            if (__isset.validUntil)
            {
                hashcode = (hashcode * 397) + ValidUntil.GetHashCode();
            }
            if (__isset.stickerIdRanges)
            {
                hashcode = (hashcode * 397) + TCollections.GetHashCode(StickerIdRanges);
            }
            if (__isset.grantedByDefault)
            {
                hashcode = (hashcode * 397) + GrantedByDefault.GetHashCode();
            }
            if (__isset.displayOrder)
            {
                hashcode = (hashcode * 397) + DisplayOrder.GetHashCode();
            }
        }
        return(hashcode);
    }
Esempio n. 2
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("ProductSimple(");
        bool __first = true;

        if (ProductId != null && __isset.productId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ProductId: ");
            ProductId.ToString(sb);
        }
        if (__isset.packageId)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("PackageId: ");
            PackageId.ToString(sb);
        }
        if (__isset.version)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Version: ");
            Version.ToString(sb);
        }
        if (__isset.onSale)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("OnSale: ");
            OnSale.ToString(sb);
        }
        if (__isset.validUntil)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("ValidUntil: ");
            ValidUntil.ToString(sb);
        }
        if (StickerIdRanges != null && __isset.stickerIdRanges)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("StickerIdRanges: ");
            StickerIdRanges.ToString(sb);
        }
        if (__isset.grantedByDefault)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("GrantedByDefault: ");
            GrantedByDefault.ToString(sb);
        }
        if (__isset.displayOrder)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("DisplayOrder: ");
            DisplayOrder.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }