OSDN Git Service

na-get-lib,アンインストール処理の中途終了に対応。
authorttp <ttp@users.sourceforge.jp>
Tue, 10 May 2011 14:41:53 +0000 (23:41 +0900)
committerttp <ttp@users.sourceforge.jp>
Tue, 10 May 2011 14:41:53 +0000 (23:41 +0900)
na-get-lib/NaGet.SubCommands/NaGetUninstall2.cs

index 7778208..fcbf1a3 100644 (file)
@@ -85,5 +85,17 @@ namespace NaGet.SubCommands
                                RaiseTaskSetEvent(TaskEventType.WARNING, string.Format("{0}は既にアンインストールされているか、ソフトの存在を確認できませんでした", uninst));
                        }
                }
+               
+               public override bool Cancelable {
+                       get {
+                               return !cancelCalled && Running && isDuringUninstalling;
+                       }
+               }
+               
+               private bool isDuringUninstalling {
+                       get {
+                               return currentSubTask is LocalUpdateSubTask;
+                       }
+               }
        }
 }