예제 #1
0
        /// <summary>
        /// 检索文件信息
        /// </summary>
        /// <param name="fetchFileInfoParam"></param>
        /// <returns></returns>
        public static FetchFileInfoResult GetFileInfo(FetchFileInfoParameter fetchFileInfoParam, IRemoteFileStorage proxy)
        {
            ManagerHelper.CheckNullReference(fetchFileInfoParam, "fetchFileInfo");
            if (proxy == null)
            {
                proxy = ServiceProxy;
            }
            FetchFileInfoResult result = proxy.FetchFileInfo(fetchFileInfoParam);

            ManagerHelper.CheckFetchResult(result);
            return(result);
        }
예제 #2
0
        public FetchFileInfoResult FetchFileInfo(FetchFileInfoParameter fetchFileInfoParam)
        {
            FetchFileInfoResult result = new FetchFileInfoResult();

            try
            {
                result = ExecuteRemoteResult("GetFileInfo", fetchFileInfoParam, result) as FetchFileInfoResult;
            }
            catch (Exception e)
            {
                result.InnerException = CreateExceptionResult(result.InnerException, e.Message);
            }
            return(result);
        }
예제 #3
0
        /// <summary>
        /// 检索文件信息
        /// </summary>
        /// <param name="logicFileInfo"></param>
        /// <returns></returns>
        public static LogicFileInfoData GetFileInfo(LogicFileInfoItemData logicFileInfo, IRemoteFileStorage proxy)
        {
            ManagerHelper.CheckNullReference(logicFileInfo, "logicFileInfo");
            FetchFileInfoParameter fetchParam = new FetchFileInfoParameter();

            fetchParam.InputData.Add(logicFileInfo);
            FetchFileInfoResult result = GetFileInfo(fetchParam, proxy);

            if (result.RecordCount > 0)
            {
                LogicFileResultItemData item = result.ExecuteResult[0];
                if (!item.LogicFileID.Equals(Guid.Empty))
                {
                    return(item.LogicFileInfo);
                }
            }
            return(null);
        }
예제 #4
0
        public FetchFileInfoResult FetchFileInfo(FetchFileInfoParameter fetchFileInfoParam)
        {
            FetchFileInfoResult result = new FetchFileInfoResult();

            try
            {
                LogicFileResultItemDataCollection items = result.ExecuteResult;
                foreach (LogicFileInfoItemData itemPara in fetchFileInfoParam.InputData)
                {
                    LogicFileInfoData       info       = this.DataProvider.FetchFileInfo(itemPara, null);
                    LogicFileResultItemData itemResult = new LogicFileResultItemData();
                    itemResult.LogicFileInfo = info;
                    items.Add(itemResult);
                }
            }
            catch (Exception e)
            {
                Utils.BuilderExecuteResult(result, e);
            }
            return(result);
        }