Inheritance: TBase
Ejemplo n.º 1
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     Role = new Role();
                     Role.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Ejemplo n.º 2
0
 public bool create_role(Role role)
 {
     send_create_role(role);
     return recv_create_role();
 }
Ejemplo n.º 3
0
 public void send_create_role(Role role)
 {
     oprot_.WriteMessageBegin(new TMessage("create_role", TMessageType.Call, seqid_));
     create_role_args args = new create_role_args();
     args.Role = role;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
Ejemplo n.º 4
0
 public void Read(TProtocol iprot)
 {
     TField field;
     iprot.ReadStructBegin();
     while (true)
     {
         field = iprot.ReadFieldBegin();
         if (field.Type == TType.Stop)
         {
             break;
         }
         switch (field.ID)
         {
             case 0:
                 if (field.Type == TType.List)
                 {
                     {
                         Success = new List<Role>();
                         TList _list216 = iprot.ReadListBegin();
                         for (int _i217 = 0; _i217 < _list216.Count; ++_i217)
                         {
                             Role _elem218 = new Role();
                             _elem218 = new Role();
                             _elem218.Read(iprot);
                             Success.Add(_elem218);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     O1 = new MetaException();
                     O1.Read(iprot);
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }