Exemple #1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("SquareEventNotifiedInviteIntoSquareChat");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (SquareChatMid != null && __isset.squareChatMid)
         {
             field.Name = "squareChatMid";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(SquareChatMid);
             oprot.WriteFieldEnd();
         }
         if (Invitees != null && __isset.invitees)
         {
             field.Name = "invitees";
             field.Type = TType.List;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, Invitees.Count));
                 foreach (SquareMember _iter340 in Invitees)
                 {
                     _iter340.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (Invitor != null && __isset.invitor)
         {
             field.Name = "invitor";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             Invitor.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (InvitorRelation != null && __isset.invitorRelation)
         {
             field.Name = "invitorRelation";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             InvitorRelation.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Exemple #2
0
    public override string ToString()
    {
        StringBuilder __sb    = new StringBuilder("SquareEventNotifiedInviteIntoSquareChat(");
        bool          __first = true;

        if (SquareChatMid != null && __isset.squareChatMid)
        {
            if (!__first)
            {
                __sb.Append(", ");
            }
            __first = false;
            __sb.Append("SquareChatMid: ");
            __sb.Append(SquareChatMid);
        }
        if (Invitees != null && __isset.invitees)
        {
            if (!__first)
            {
                __sb.Append(", ");
            }
            __first = false;
            __sb.Append("Invitees: ");
            __sb.Append(Invitees);
        }
        if (Invitor != null && __isset.invitor)
        {
            if (!__first)
            {
                __sb.Append(", ");
            }
            __first = false;
            __sb.Append("Invitor: ");
            __sb.Append(Invitor == null ? "<null>" : Invitor.ToString());
        }
        if (InvitorRelation != null && __isset.invitorRelation)
        {
            if (!__first)
            {
                __sb.Append(", ");
            }
            __first = false;
            __sb.Append("InvitorRelation: ");
            __sb.Append(InvitorRelation == null ? "<null>" : InvitorRelation.ToString());
        }
        __sb.Append(")");
        return(__sb.ToString());
    }
Exemple #3
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("SquareEventNotifiedInviteIntoSquareChat(");
        bool __first = true;

        if (SquareChatMid != null && __isset.squareChatMid)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("SquareChatMid: ");
            SquareChatMid.ToString(sb);
        }
        if (Invitees != null && __isset.invitees)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Invitees: ");
            Invitees.ToString(sb);
        }
        if (Invitor != null && __isset.invitor)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Invitor: ");
            Invitor.ToString(sb);
        }
        if (InvitorRelation != null && __isset.invitorRelation)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("InvitorRelation: ");
            InvitorRelation.ToString(sb);
        }
        sb.Append(")");
        return(sb.ToString());
    }
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.squareChatMid)
            {
                hashcode = (hashcode * 397) + SquareChatMid.GetHashCode();
            }
            if (__isset.invitees)
            {
                hashcode = (hashcode * 397) + TCollections.GetHashCode(Invitees);
            }
            if (__isset.invitor)
            {
                hashcode = (hashcode * 397) + Invitor.GetHashCode();
            }
            if (__isset.invitorRelation)
            {
                hashcode = (hashcode * 397) + InvitorRelation.GetHashCode();
            }
        }
        return(hashcode);
    }
    public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
    {
        oprot.IncrementRecursionDepth();
        try
        {
            var struc = new TStruct("SquareEventNotifiedInviteIntoSquareChat");
            await oprot.WriteStructBeginAsync(struc, cancellationToken);

            var field = new TField();
            if (SquareChatMid != null && __isset.squareChatMid)
            {
                field.Name = "squareChatMid";
                field.Type = TType.String;
                field.ID   = 1;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await oprot.WriteStringAsync(SquareChatMid, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if (Invitees != null && __isset.invitees)
            {
                field.Name = "invitees";
                field.Type = TType.List;
                field.ID   = 2;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                {
                    await oprot.WriteListBeginAsync(new TList(TType.Struct, Invitees.Count), cancellationToken);

                    foreach (SquareMember _iter340 in Invitees)
                    {
                        await _iter340.WriteAsync(oprot, cancellationToken);
                    }
                    await oprot.WriteListEndAsync(cancellationToken);
                }
                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if (Invitor != null && __isset.invitor)
            {
                field.Name = "invitor";
                field.Type = TType.Struct;
                field.ID   = 3;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await Invitor.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if (InvitorRelation != null && __isset.invitorRelation)
            {
                field.Name = "invitorRelation";
                field.Type = TType.Struct;
                field.ID   = 4;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await InvitorRelation.WriteAsync(oprot, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);

            await oprot.WriteStructEndAsync(cancellationToken);
        }
        finally
        {
            oprot.DecrementRecursionDepth();
        }
    }