コード例 #1
0
        /// <exception cref="System.IO.IOException"/>
        public virtual ICollection <RefreshResponse> Refresh(string identifier, string[] args
                                                             )
        {
            IList <string> argList = Arrays.AsList(args);

            try
            {
                GenericRefreshProtocolProtos.GenericRefreshRequestProto request = ((GenericRefreshProtocolProtos.GenericRefreshRequestProto
                                                                                    )GenericRefreshProtocolProtos.GenericRefreshRequestProto.NewBuilder().SetIdentifier
                                                                                       (identifier).AddAllArgs(argList).Build());
                GenericRefreshProtocolProtos.GenericRefreshResponseCollectionProto resp = rpcProxy
                                                                                          .Refresh(NullController, request);
                return(Unpack(resp));
            }
            catch (ServiceException se)
            {
                throw ProtobufHelper.GetRemoteException(se);
            }
        }
 Refresh(RpcController controller, GenericRefreshProtocolProtos.GenericRefreshRequestProto
         request)
 {
     try
     {
         IList <string> argList = request.GetArgsList();
         string[]       args    = Collections.ToArray(argList, new string[argList.Count]);
         if (!request.HasIdentifier())
         {
             throw new ServiceException("Request must contain identifier");
         }
         ICollection <RefreshResponse> results = impl.Refresh(request.GetIdentifier(), args
                                                              );
         return(Pack(results));
     }
     catch (IOException e)
     {
         throw new ServiceException(e);
     }
 }