OSDN Git Service

AssemblyVersion, AssemblyCopyright を更新
[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         [Serializable()]\r
19         public class NaGetTaskCanceledException : Exception\r
20         {\r
21                 public NaGetTaskCanceledException(string msg)\r
22                         : base(msg)\r
23                 {\r
24                 }\r
25                 \r
26                 public NaGetTaskCanceledException(string msg, Exception e)\r
27                         : base(msg, e)\r
28                 {\r
29                 }\r
30         }\r
31         \r
32         /// <summary>\r
33         /// NaGet\82Ì\83R\83}\83\93\83h\83^\83X\83N\82Ì\8dÅ\8f¬\92P\88Ê\82Ì\90e\83N\83\89\83X\r
34         /// </summary>\r
35         public abstract class NaGetTask\r
36         {\r
37                 /// <summary>\r
38                 /// \8eÀ\8ds\82·\82é\r
39                 /// </summary>\r
40                 public abstract void Run();\r
41                 \r
42                 /// <summary>\r
43                 /// \8eÀ\8ds\8fó\91Ô\82©\94Û\82©\82ð\93¾\82é\r
44                 /// </summary>\r
45                 public abstract bool Running {\r
46                         get;\r
47                 }\r
48                 \r
49                 /// <summary>\r
50                 /// \8fI\97¹\82µ\82Ä\82¢\82é\82©\94Û\82©\81B\r
51                 /// </summary>\r
52                 public abstract bool Done {\r
53                         get;\r
54                 }\r
55                 \r
56                 /// <summary>\r
57                 /// \83L\83\83\83\93\83Z\83\8b\89Â\94\\82©\94Û\82©\82ð\95Ô\82·\r
58                 /// </summary>\r
59                 public virtual bool Cancelable {\r
60                         get { return false; }\r
61                 }\r
62                 \r
63                 /// <summary>\r
64                 /// \92\86\92f\82³\82¹\82é\r
65                 /// </summary>\r
66                 /// <returns>\90¬\8c÷\82µ\82½\82©\82¢\82È\82©</returns>\r
67                 public virtual bool Cancel()\r
68                 {\r
69                         return false;\r
70                 }\r
71         }\r
72 }\r