markus / MarkusAutoUpdate / src / NetSparkle / NetSparkleDelegates.cs @ cf1cc862
이력 | 보기 | 이력해설 | 다운로드 (3.39 KB)
1 | d8f5045e | taeseongkim | using NetSparkleUpdater.Enums; |
---|---|---|---|
2 | using NetSparkleUpdater.Events; |
||
3 | using System; |
||
4 | using System.Collections.Generic; |
||
5 | using System.ComponentModel; |
||
6 | using System.Linq; |
||
7 | using System.Text; |
||
8 | using System.Threading.Tasks; |
||
9 | |||
10 | namespace NetSparkleUpdater |
||
11 | { |
||
12 | /// <summary> |
||
13 | /// The operation has started |
||
14 | /// </summary> |
||
15 | /// <param name="sender">the sender</param> |
||
16 | public delegate void LoopStartedOperation(object sender); |
||
17 | /// <summary> |
||
18 | /// The operation has ended |
||
19 | /// </summary> |
||
20 | /// <param name="sender">the sender</param> |
||
21 | /// <param name="updateRequired"><c>true</c> if an update is required</param> |
||
22 | public delegate void LoopFinishedOperation(object sender, bool updateRequired); |
||
23 | |||
24 | /// <summary> |
||
25 | /// This delegate will be used when an update was detected to allow library |
||
26 | /// consumer to add own user interface capabilities. |
||
27 | /// </summary> |
||
28 | public delegate void UpdateDetected(object sender, UpdateDetectedEventArgs e); |
||
29 | |||
30 | /// <summary> |
||
31 | /// Update check has started. |
||
32 | /// </summary> |
||
33 | /// <param name="sender">Sparkle updater that is checking for an update.</param> |
||
34 | public delegate void UpdateCheckStarted(object sender); |
||
35 | |||
36 | /// <summary> |
||
37 | /// Update check has finished. |
||
38 | /// </summary> |
||
39 | /// <param name="sender">Sparkle updater that finished checking for an update.</param> |
||
40 | /// <param name="status">Update status</param> |
||
41 | public delegate void UpdateCheckFinished(object sender, UpdateStatus status); |
||
42 | |||
43 | /// <summary> |
||
44 | /// An asynchronous cancel event handler. |
||
45 | /// </summary> |
||
46 | /// <param name="sender">The source of the event.</param> |
||
47 | /// <param name="e">A System.ComponentModel.CancelEventArgs that contains the event data.</param> |
||
48 | public delegate Task CancelEventHandlerAsync(object sender, CancelEventArgs e); |
||
49 | |||
50 | /// <summary> |
||
51 | /// Delegate for custom application shutdown logic |
||
52 | /// </summary> |
||
53 | public delegate void CloseApplication(); |
||
54 | |||
55 | /// <summary> |
||
56 | /// Async version of CloseApplication(). |
||
57 | /// Delegate for custom application shutdown logic |
||
58 | /// </summary> |
||
59 | public delegate Task CloseApplicationAsync(); |
||
60 | |||
61 | /// <summary> |
||
62 | /// A delegate for download events (start, canceled). |
||
63 | /// </summary> |
||
64 | public delegate void DownloadEvent(AppCastItem item, string path); |
||
65 | |||
66 | /// <summary> |
||
67 | /// A delegate for download progress events (TODO: docs update) |
||
68 | /// </summary> |
||
69 | /// <param name="sender"></param> |
||
70 | /// <param name="args"></param> |
||
71 | public delegate void DownloadProgressEvent(object sender, ItemDownloadProgressEventArgs args); |
||
72 | |||
73 | /// <summary> |
||
74 | /// A delegate for download progress events for a given item (TODO: docs update) |
||
75 | /// </summary> |
||
76 | /// <param name="sender"></param> |
||
77 | /// <param name="item"></param> |
||
78 | /// <param name="args"></param> |
||
79 | public delegate void ItemDownloadProgressEvent(object sender, AppCastItem item, ItemDownloadProgressEventArgs args); |
||
80 | |||
81 | /// <summary> |
||
82 | /// A handler called when the user responsed to an available update |
||
83 | /// </summary> |
||
84 | /// <param name="sender">The source of the event.</param> |
||
85 | /// <param name="e">An UpdateResponse object that contains the event data.</param> |
||
86 | public delegate void UserRespondedToUpdate(object sender, UpdateResponseEventArgs e); |
||
87 | |||
88 | /// <summary> |
||
89 | /// A delegate for a download error |
||
90 | /// </summary> |
||
91 | public delegate void DownloadErrorEvent(AppCastItem item, string path, Exception exception); |
||
92 | } |