OSDN Git Service

na-get-lib,レポジトリタイプの追加。
[applistation/AppliStation.git] / na-get-lib / NaGet.SubCommands / NaGetTask.cs
1 using System;\r
2 \r
3 namespace NaGet.SubCommands\r
4 {\r
5         public class NaGetEventArgs : EventArgs\r
6         {\r
7                 /// <summary>\r
8                 /// \83^\83X\83N\82Ì\90i\92»\8fó\8bµ\82Ì\95S\95ª\97¦\95\\8e¦\r
9                 /// </summary>\r
10                 public float TaskProgressPercent = -1;\r
11                 \r
12                 /// <summary>\r
13                 /// \83^\83X\83N\82Ì\8c»\8bµ\82Ì\83\81\83b\83Z\81[\83W\r
14                 /// </summary>\r
15                 public string TaskMessage;\r
16         }\r
17         \r
18         public class NaGetTaskCanceledException : Exception\r
19         {\r
20                 public NaGetTaskCanceledException(string msg)\r
21                         : base(msg)\r
22                 {\r
23                 }\r
24                 \r
25                 public NaGetTaskCanceledException(string msg, Exception e)\r
26                         : base(msg, e)\r
27                 {\r
28                 }\r
29         }\r
30         \r
31         /// <summary>\r
32         /// NaGet\82Ì\83R\83}\83\93\83h\83^\83X\83N\82Ì\8dÅ\8f¬\92P\88Ê\82Ì\90e\83N\83\89\83X\r
33         /// </summary>\r
34         public abstract class NaGetTask\r
35         {\r
36                 /// <summary>\r
37                 /// \8eÀ\8ds\82·\82é\r
38                 /// </summary>\r
39                 public abstract void Run();\r
40                 \r
41                 /// <summary>\r
42                 /// \8eÀ\8ds\8fó\91Ô\82©\94Û\82©\82ð\93¾\82é\r
43                 /// </summary>\r
44                 public abstract bool Running {\r
45                         get;\r
46                 }\r
47                 \r
48                 /// <summary>\r
49                 /// \8fI\97¹\82µ\82Ä\82¢\82é\82©\94Û\82©\81B\r
50                 /// </summary>\r
51                 public abstract bool Done {\r
52                         get;\r
53                 }\r
54                 \r
55                 /// <summary>\r
56                 /// \83L\83\83\83\93\83Z\83\8b\89Â\94\\82©\94Û\82©\82ð\95Ô\82·\r
57                 /// </summary>\r
58                 public virtual bool Cancelable {\r
59                         get { return false; }\r
60                 }\r
61                 \r
62                 /// <summary>\r
63                 /// \92\86\92f\82³\82¹\82é\r
64                 /// </summary>\r
65                 /// <returns>\90¬\8c÷\82µ\82½\82©\82¢\82È\82©</returns>\r
66                 public virtual bool Cancel()\r
67                 {\r
68                         return false;\r
69                 }\r
70         }\r
71 }\r