/// <exception cref="System.IO.IOException"/> public virtual string[] GetGroupsForUser(string user) { GetUserMappingsProtocolProtos.GetGroupsForUserRequestProto request = ((GetUserMappingsProtocolProtos.GetGroupsForUserRequestProto )GetUserMappingsProtocolProtos.GetGroupsForUserRequestProto.NewBuilder().SetUser (user).Build()); GetUserMappingsProtocolProtos.GetGroupsForUserResponseProto resp; try { resp = rpcProxy.GetGroupsForUser(NullController, request); } catch (ServiceException se) { throw ProtobufHelper.GetRemoteException(se); } return(Collections.ToArray(resp.GetGroupsList(), new string[resp.GetGroupsCount ()])); }
/// <exception cref="Com.Google.Protobuf.ServiceException"/> public virtual GetUserMappingsProtocolProtos.GetGroupsForUserResponseProto GetGroupsForUser (RpcController controller, GetUserMappingsProtocolProtos.GetGroupsForUserRequestProto request) { string[] groups; try { groups = impl.GetGroupsForUser(request.GetUser()); } catch (IOException e) { throw new ServiceException(e); } GetUserMappingsProtocolProtos.GetGroupsForUserResponseProto.Builder builder = GetUserMappingsProtocolProtos.GetGroupsForUserResponseProto .NewBuilder(); foreach (string g in groups) { builder.AddGroups(g); } return((GetUserMappingsProtocolProtos.GetGroupsForUserResponseProto)builder.Build ()); }