Beispiel #1
0
            public void Write(TProtocol oprot)
            {
                TStruct struc = new TStruct("Process_result");

                oprot.WriteStructBegin(struc);
                TField field = new TField();

                if (this.__isset.success)
                {
                    if (Success != null)
                    {
                        field.Name = "Success";
                        field.Type = TType.Struct;
                        field.ID   = 0;
                        oprot.WriteFieldBegin(field);
                        Success.Write(oprot);
                        oprot.WriteFieldEnd();
                    }
                }
                else if (this.__isset.badRequestException)
                {
                    if (BadRequestException != null)
                    {
                        field.Name = "BadRequestException";
                        field.Type = TType.Struct;
                        field.ID   = 1;
                        oprot.WriteFieldBegin(field);
                        BadRequestException.Write(oprot);
                        oprot.WriteFieldEnd();
                    }
                }
                else if (this.__isset.internalServerException)
                {
                    if (InternalServerException != null)
                    {
                        field.Name = "InternalServerException";
                        field.Type = TType.Struct;
                        field.ID   = 2;
                        oprot.WriteFieldBegin(field);
                        InternalServerException.Write(oprot);
                        oprot.WriteFieldEnd();
                    }
                }
                else if (this.__isset.invocationException)
                {
                    if (InvocationException != null)
                    {
                        field.Name = "InvocationException";
                        field.Type = TType.Struct;
                        field.ID   = 3;
                        oprot.WriteFieldBegin(field);
                        InvocationException.Write(oprot);
                        oprot.WriteFieldEnd();
                    }
                }
                oprot.WriteFieldStop();
                oprot.WriteStructEnd();
            }
Beispiel #2
0
            public override string ToString()
            {
                StringBuilder __sb    = new StringBuilder("Process_result(");
                bool          __first = true;

                if (Success != null && __isset.success)
                {
                    if (!__first)
                    {
                        __sb.Append(", ");
                    }
                    __first = false;
                    __sb.Append("Success: ");
                    __sb.Append(Success == null ? "<null>" : Success.ToString());
                }
                if (BadRequestException != null && __isset.badRequestException)
                {
                    if (!__first)
                    {
                        __sb.Append(", ");
                    }
                    __first = false;
                    __sb.Append("BadRequestException: ");
                    __sb.Append(BadRequestException == null ? "<null>" : BadRequestException.ToString());
                }
                if (InternalServerException != null && __isset.internalServerException)
                {
                    if (!__first)
                    {
                        __sb.Append(", ");
                    }
                    __first = false;
                    __sb.Append("InternalServerException: ");
                    __sb.Append(InternalServerException == null ? "<null>" : InternalServerException.ToString());
                }
                if (InvocationException != null && __isset.invocationException)
                {
                    if (!__first)
                    {
                        __sb.Append(", ");
                    }
                    __first = false;
                    __sb.Append("InvocationException: ");
                    __sb.Append(InvocationException == null ? "<null>" : InvocationException.ToString());
                }
                __sb.Append(")");
                return(__sb.ToString());
            }