Exemplo n.º 1
0
    public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
    {
        oprot.IncrementRecursionDepth();
        try
        {
            var struc = new TStruct("GroupCallRoute");
            await oprot.WriteStructBeginAsync(struc, cancellationToken);

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

                await oprot.WriteStringAsync(Token, cancellationToken);

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

                await Cscf.WriteAsync(oprot, cancellationToken);

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

                await Mix.WriteAsync(oprot, cancellationToken);

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

            await oprot.WriteStructEndAsync(cancellationToken);
        }
        finally
        {
            oprot.DecrementRecursionDepth();
        }
    }
Exemplo n.º 2
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("GroupCallRoute");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Token != null && __isset.token)
         {
             field.Name = "token";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Token);
             oprot.WriteFieldEnd();
         }
         if (Cscf != null && __isset.cscf)
         {
             field.Name = "cscf";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             Cscf.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Mix != null && __isset.mix)
         {
             field.Name = "mix";
             field.Type = TType.Struct;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             Mix.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Exemplo n.º 3
0
    public override int GetHashCode()
    {
        int hashcode = 157;

        unchecked {
            if (__isset.token)
            {
                hashcode = (hashcode * 397) + Token.GetHashCode();
            }
            if (__isset.cscf)
            {
                hashcode = (hashcode * 397) + Cscf.GetHashCode();
            }
            if (__isset.mix)
            {
                hashcode = (hashcode * 397) + Mix.GetHashCode();
            }
        }
        return(hashcode);
    }
Exemplo n.º 4
0
    public override string ToString()
    {
        var  sb      = new StringBuilder("GroupCallRoute(");
        bool __first = true;

        if (Token != null && __isset.token)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Token: ");
            sb.Append(Token);
        }
        if (Cscf != null && __isset.cscf)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Cscf: ");
            sb.Append(Cscf == null ? "<null>" : Cscf.ToString());
        }
        if (Mix != null && __isset.mix)
        {
            if (!__first)
            {
                sb.Append(", ");
            }
            __first = false;
            sb.Append("Mix: ");
            sb.Append(Mix == null ? "<null>" : Mix.ToString());
        }
        sb.Append(")");
        return(sb.ToString());
    }