Beispiel #1
0
 /// <summary>
 /// 关闭文件
 /// </summary>
 /// <param name="lockID"></param>
 /// <param name="proxy"></param>
 /// <returns></returns>
 public static bool CloseFileByLockID(Guid lockID, IRemoteFileStorage proxy)
 {
     if (lockID != Guid.Empty)
     {
         CloseFileItemData item = new CloseFileItemData();
         item.LockID = lockID;
         CloseFileResultItemData itemResult = CloseFile(item, proxy);
         if (itemResult != null)
         {
             return(itemResult.Succeed);
         }
     }
     return(false);
 }
Beispiel #2
0
        /// <summary>
        /// 关闭文件
        /// </summary>
        /// <param name="closeFileItem"></param>
        /// <param name="proxy"></param>
        /// <returns></returns>
        public static CloseFileResultItemData CloseFile(CloseFileItemData closeFileItem, IRemoteFileStorage proxy)
        {
            CloseFileResultItemData result = null;

            ManagerHelper.CheckNullReference(closeFileItem, "closeFileItem");
            CloseFileParameter param = new CloseFileParameter();

            param.InputData.Add(closeFileItem);
            CloseFileResult itemResult = CloseFile(param, proxy);

            if (itemResult.RecordCount > 0)
            {
                result = itemResult.ExecuteResult[0];
            }
            return(result);
        }
Beispiel #3
0
 /// <summary>
 /// 关闭文件
 /// </summary>
 /// <param name="closeFileItem"></param>
 /// <returns></returns>
 public static CloseFileResultItemData CloseFile(CloseFileItemData closeFileItem)
 {
     return(CloseFile(closeFileItem, null));
 }