コード例 #1
0
 public void send_grant_role(string role_name, string principal_name, PrincipalType principal_type, string grantor, PrincipalType grantorType, bool grant_option)
 {
     oprot_.WriteMessageBegin(new TMessage("grant_role", TMessageType.Call, seqid_));
     grant_role_args args = new grant_role_args();
     args.Role_name = role_name;
     args.Principal_name = principal_name;
     args.Principal_type = principal_type;
     args.Grantor = grantor;
     args.GrantorType = grantorType;
     args.Grant_option = grant_option;
     args.Write(oprot_);
     oprot_.WriteMessageEnd();
     oprot_.Transport.Flush();
 }
コード例 #2
0
 public void grant_role_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
     grant_role_args args = new grant_role_args();
     args.Read(iprot);
     iprot.ReadMessageEnd();
     grant_role_result result = new grant_role_result();
     try
     {
         result.Success = iface_.grant_role(args.Role_name, args.Principal_name, args.Principal_type, args.Grantor, args.GrantorType, args.Grant_option);
     }
     catch (MetaException o1)
     {
         result.O1 = o1;
     }
     oprot.WriteMessageBegin(new TMessage("grant_role", TMessageType.Reply, seqid));
     result.Write(oprot);
     oprot.WriteMessageEnd();
     oprot.Transport.Flush();
 }