diff options
author | Rob Mensching <rob@firegiant.com> | 2021-04-22 05:46:03 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-04-29 16:41:44 -0700 |
commit | c00516901e6b67e398396b14fe7682d0376f8643 (patch) | |
tree | b0d62089a1c5700c7f2c3e3790750bf2d8ea33c0 /src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |
parent | 8eb98efd2175d9ece2e4639d43081667af9a4990 (diff) | |
download | wix-c00516901e6b67e398396b14fe7682d0376f8643.tar.gz wix-c00516901e6b67e398396b14fe7682d0376f8643.tar.bz2 wix-c00516901e6b67e398396b14fe7682d0376f8643.zip |
Move balutil into API/burn
Diffstat (limited to 'src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs')
-rw-r--r-- | src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | 1873 |
1 files changed, 1873 insertions, 0 deletions
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs new file mode 100644 index 00000000..072d3ef0 --- /dev/null +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
@@ -0,0 +1,1873 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Core | ||
4 | { | ||
5 | using System; | ||
6 | using System.Runtime.InteropServices; | ||
7 | using System.Threading; | ||
8 | |||
9 | /// <summary> | ||
10 | /// The default bootstrapper application. | ||
11 | /// </summary> | ||
12 | [ClassInterface(ClassInterfaceType.None)] | ||
13 | public abstract class BootstrapperApplication : MarshalByRefObject, IDefaultBootstrapperApplication | ||
14 | { | ||
15 | /// <summary> | ||
16 | /// Specifies whether this bootstrapper should run asynchronously. The default is true. | ||
17 | /// </summary> | ||
18 | protected readonly bool asyncExecution; | ||
19 | |||
20 | /// <summary> | ||
21 | /// Gets the <see cref="IEngine"/> for interaction with the engine. | ||
22 | /// </summary> | ||
23 | protected readonly IEngine engine; | ||
24 | |||
25 | private bool applying; | ||
26 | |||
27 | /// <summary> | ||
28 | /// Creates a new instance of the <see cref="BootstrapperApplication"/> class. | ||
29 | /// </summary> | ||
30 | protected BootstrapperApplication(IEngine engine) | ||
31 | { | ||
32 | this.engine = engine; | ||
33 | this.applying = false; | ||
34 | this.asyncExecution = true; | ||
35 | } | ||
36 | |||
37 | /// <inheritdoc/> | ||
38 | public event EventHandler<StartupEventArgs> Startup; | ||
39 | |||
40 | /// <inheritdoc/> | ||
41 | public event EventHandler<ShutdownEventArgs> Shutdown; | ||
42 | |||
43 | /// <inheritdoc/> | ||
44 | public event EventHandler<SystemShutdownEventArgs> SystemShutdown; | ||
45 | |||
46 | /// <inheritdoc/> | ||
47 | public event EventHandler<DetectBeginEventArgs> DetectBegin; | ||
48 | |||
49 | /// <inheritdoc/> | ||
50 | public event EventHandler<DetectForwardCompatibleBundleEventArgs> DetectForwardCompatibleBundle; | ||
51 | |||
52 | /// <inheritdoc/> | ||
53 | public event EventHandler<DetectUpdateBeginEventArgs> DetectUpdateBegin; | ||
54 | |||
55 | /// <inheritdoc/> | ||
56 | public event EventHandler<DetectUpdateEventArgs> DetectUpdate; | ||
57 | |||
58 | /// <inheritdoc/> | ||
59 | public event EventHandler<DetectUpdateCompleteEventArgs> DetectUpdateComplete; | ||
60 | |||
61 | /// <inheritdoc/> | ||
62 | public event EventHandler<DetectRelatedBundleEventArgs> DetectRelatedBundle; | ||
63 | |||
64 | /// <inheritdoc/> | ||
65 | public event EventHandler<DetectPackageBeginEventArgs> DetectPackageBegin; | ||
66 | |||
67 | /// <inheritdoc/> | ||
68 | public event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage; | ||
69 | |||
70 | /// <inheritdoc/> | ||
71 | public event EventHandler<DetectPatchTargetEventArgs> DetectPatchTarget; | ||
72 | |||
73 | /// <inheritdoc/> | ||
74 | public event EventHandler<DetectMsiFeatureEventArgs> DetectMsiFeature; | ||
75 | |||
76 | /// <inheritdoc/> | ||
77 | public event EventHandler<DetectPackageCompleteEventArgs> DetectPackageComplete; | ||
78 | |||
79 | /// <inheritdoc/> | ||
80 | public event EventHandler<DetectCompleteEventArgs> DetectComplete; | ||
81 | |||
82 | /// <inheritdoc/> | ||
83 | public event EventHandler<PlanBeginEventArgs> PlanBegin; | ||
84 | |||
85 | /// <inheritdoc/> | ||
86 | public event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle; | ||
87 | |||
88 | /// <inheritdoc/> | ||
89 | public event EventHandler<PlanPackageBeginEventArgs> PlanPackageBegin; | ||
90 | |||
91 | /// <inheritdoc/> | ||
92 | public event EventHandler<PlanPatchTargetEventArgs> PlanPatchTarget; | ||
93 | |||
94 | /// <inheritdoc/> | ||
95 | public event EventHandler<PlanMsiFeatureEventArgs> PlanMsiFeature; | ||
96 | |||
97 | /// <inheritdoc/> | ||
98 | public event EventHandler<PlanMsiPackageEventArgs> PlanMsiPackage; | ||
99 | |||
100 | /// <inheritdoc/> | ||
101 | public event EventHandler<PlanPackageCompleteEventArgs> PlanPackageComplete; | ||
102 | |||
103 | /// <inheritdoc/> | ||
104 | public event EventHandler<PlannedPackageEventArgs> PlannedPackage; | ||
105 | |||
106 | /// <inheritdoc/> | ||
107 | public event EventHandler<PlanCompleteEventArgs> PlanComplete; | ||
108 | |||
109 | /// <inheritdoc/> | ||
110 | public event EventHandler<ApplyBeginEventArgs> ApplyBegin; | ||
111 | |||
112 | /// <inheritdoc/> | ||
113 | public event EventHandler<ElevateBeginEventArgs> ElevateBegin; | ||
114 | |||
115 | /// <inheritdoc/> | ||
116 | public event EventHandler<ElevateCompleteEventArgs> ElevateComplete; | ||
117 | |||
118 | /// <inheritdoc/> | ||
119 | public event EventHandler<ProgressEventArgs> Progress; | ||
120 | |||
121 | /// <inheritdoc/> | ||
122 | public event EventHandler<ErrorEventArgs> Error; | ||
123 | |||
124 | /// <inheritdoc/> | ||
125 | public event EventHandler<RegisterBeginEventArgs> RegisterBegin; | ||
126 | |||
127 | /// <inheritdoc/> | ||
128 | public event EventHandler<RegisterCompleteEventArgs> RegisterComplete; | ||
129 | |||
130 | /// <inheritdoc/> | ||
131 | public event EventHandler<UnregisterBeginEventArgs> UnregisterBegin; | ||
132 | |||
133 | /// <inheritdoc/> | ||
134 | public event EventHandler<UnregisterCompleteEventArgs> UnregisterComplete; | ||
135 | |||
136 | /// <inheritdoc/> | ||
137 | public event EventHandler<CacheBeginEventArgs> CacheBegin; | ||
138 | |||
139 | /// <inheritdoc/> | ||
140 | public event EventHandler<CachePackageBeginEventArgs> CachePackageBegin; | ||
141 | |||
142 | /// <inheritdoc/> | ||
143 | public event EventHandler<CacheAcquireBeginEventArgs> CacheAcquireBegin; | ||
144 | |||
145 | /// <inheritdoc/> | ||
146 | public event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress; | ||
147 | |||
148 | /// <inheritdoc/> | ||
149 | public event EventHandler<CacheAcquireResolvingEventArgs> CacheAcquireResolving; | ||
150 | |||
151 | /// <inheritdoc/> | ||
152 | public event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; | ||
153 | |||
154 | /// <inheritdoc/> | ||
155 | public event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin; | ||
156 | |||
157 | /// <inheritdoc/> | ||
158 | public event EventHandler<CacheVerifyProgressEventArgs> CacheVerifyProgress; | ||
159 | |||
160 | /// <inheritdoc/> | ||
161 | public event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete; | ||
162 | |||
163 | /// <inheritdoc/> | ||
164 | public event EventHandler<CachePackageCompleteEventArgs> CachePackageComplete; | ||
165 | |||
166 | /// <inheritdoc/> | ||
167 | public event EventHandler<CacheCompleteEventArgs> CacheComplete; | ||
168 | |||
169 | /// <inheritdoc/> | ||
170 | public event EventHandler<ExecuteBeginEventArgs> ExecuteBegin; | ||
171 | |||
172 | /// <inheritdoc/> | ||
173 | public event EventHandler<ExecutePackageBeginEventArgs> ExecutePackageBegin; | ||
174 | |||
175 | /// <inheritdoc/> | ||
176 | public event EventHandler<ExecutePatchTargetEventArgs> ExecutePatchTarget; | ||
177 | |||
178 | /// <inheritdoc/> | ||
179 | public event EventHandler<ExecuteMsiMessageEventArgs> ExecuteMsiMessage; | ||
180 | |||
181 | /// <inheritdoc/> | ||
182 | public event EventHandler<ExecuteFilesInUseEventArgs> ExecuteFilesInUse; | ||
183 | |||
184 | /// <inheritdoc/> | ||
185 | public event EventHandler<ExecutePackageCompleteEventArgs> ExecutePackageComplete; | ||
186 | |||
187 | /// <inheritdoc/> | ||
188 | public event EventHandler<ExecuteCompleteEventArgs> ExecuteComplete; | ||
189 | |||
190 | /// <inheritdoc/> | ||
191 | public event EventHandler<ApplyCompleteEventArgs> ApplyComplete; | ||
192 | |||
193 | /// <inheritdoc/> | ||
194 | public event EventHandler<ExecuteProgressEventArgs> ExecuteProgress; | ||
195 | |||
196 | /// <inheritdoc/> | ||
197 | public event EventHandler<LaunchApprovedExeBeginEventArgs> LaunchApprovedExeBegin; | ||
198 | |||
199 | /// <inheritdoc/> | ||
200 | public event EventHandler<LaunchApprovedExeCompleteEventArgs> LaunchApprovedExeComplete; | ||
201 | |||
202 | /// <inheritdoc/> | ||
203 | public event EventHandler<BeginMsiTransactionBeginEventArgs> BeginMsiTransactionBegin; | ||
204 | |||
205 | /// <inheritdoc/> | ||
206 | public event EventHandler<BeginMsiTransactionCompleteEventArgs> BeginMsiTransactionComplete; | ||
207 | |||
208 | /// <inheritdoc/> | ||
209 | public event EventHandler<CommitMsiTransactionBeginEventArgs> CommitMsiTransactionBegin; | ||
210 | |||
211 | /// <inheritdoc/> | ||
212 | public event EventHandler<CommitMsiTransactionCompleteEventArgs> CommitMsiTransactionComplete; | ||
213 | |||
214 | /// <inheritdoc/> | ||
215 | public event EventHandler<RollbackMsiTransactionBeginEventArgs> RollbackMsiTransactionBegin; | ||
216 | |||
217 | /// <inheritdoc/> | ||
218 | public event EventHandler<RollbackMsiTransactionCompleteEventArgs> RollbackMsiTransactionComplete; | ||
219 | |||
220 | /// <inheritdoc/> | ||
221 | public event EventHandler<PauseAutomaticUpdatesBeginEventArgs> PauseAutomaticUpdatesBegin; | ||
222 | |||
223 | /// <inheritdoc/> | ||
224 | public event EventHandler<PauseAutomaticUpdatesCompleteEventArgs> PauseAutomaticUpdatesComplete; | ||
225 | |||
226 | /// <inheritdoc/> | ||
227 | public event EventHandler<SystemRestorePointBeginEventArgs> SystemRestorePointBegin; | ||
228 | |||
229 | /// <inheritdoc/> | ||
230 | public event EventHandler<SystemRestorePointCompleteEventArgs> SystemRestorePointComplete; | ||
231 | |||
232 | /// <inheritdoc/> | ||
233 | public event EventHandler<PlanForwardCompatibleBundleEventArgs> PlanForwardCompatibleBundle; | ||
234 | |||
235 | /// <inheritdoc/> | ||
236 | public event EventHandler<CacheContainerOrPayloadVerifyBeginEventArgs> CacheContainerOrPayloadVerifyBegin; | ||
237 | |||
238 | /// <inheritdoc/> | ||
239 | public event EventHandler<CacheContainerOrPayloadVerifyProgressEventArgs> CacheContainerOrPayloadVerifyProgress; | ||
240 | |||
241 | /// <inheritdoc/> | ||
242 | public event EventHandler<CacheContainerOrPayloadVerifyCompleteEventArgs> CacheContainerOrPayloadVerifyComplete; | ||
243 | |||
244 | /// <inheritdoc/> | ||
245 | public event EventHandler<CachePayloadExtractBeginEventArgs> CachePayloadExtractBegin; | ||
246 | |||
247 | /// <inheritdoc/> | ||
248 | public event EventHandler<CachePayloadExtractProgressEventArgs> CachePayloadExtractProgress; | ||
249 | |||
250 | /// <inheritdoc/> | ||
251 | public event EventHandler<CachePayloadExtractCompleteEventArgs> CachePayloadExtractComplete; | ||
252 | |||
253 | /// <summary> | ||
254 | /// Entry point that is called when the bootstrapper application is ready to run. | ||
255 | /// </summary> | ||
256 | protected abstract void Run(); | ||
257 | |||
258 | /// <summary> | ||
259 | /// Called by the engine, raises the <see cref="Startup"/> event. | ||
260 | /// </summary> | ||
261 | /// <param name="args">Additional arguments for this event.</param> | ||
262 | protected virtual void OnStartup(StartupEventArgs args) | ||
263 | { | ||
264 | EventHandler<StartupEventArgs> handler = this.Startup; | ||
265 | if (null != handler) | ||
266 | { | ||
267 | handler(this, args); | ||
268 | } | ||
269 | |||
270 | if (this.asyncExecution) | ||
271 | { | ||
272 | this.engine.Log(LogLevel.Verbose, "Creating BA thread to run asynchronously."); | ||
273 | Thread uiThread = new Thread(this.Run); | ||
274 | uiThread.Name = "UIThread"; | ||
275 | uiThread.SetApartmentState(ApartmentState.STA); | ||
276 | uiThread.Start(); | ||
277 | } | ||
278 | else | ||
279 | { | ||
280 | this.engine.Log(LogLevel.Verbose, "Creating BA thread to run synchronously."); | ||
281 | this.Run(); | ||
282 | } | ||
283 | } | ||
284 | |||
285 | /// <summary> | ||
286 | /// Called by the engine, raises the <see cref="Shutdown"/> event. | ||
287 | /// </summary> | ||
288 | /// <param name="args">Additional arguments for this event.</param> | ||
289 | protected virtual void OnShutdown(ShutdownEventArgs args) | ||
290 | { | ||
291 | EventHandler<ShutdownEventArgs> handler = this.Shutdown; | ||
292 | if (null != handler) | ||
293 | { | ||
294 | handler(this, args); | ||
295 | } | ||
296 | } | ||
297 | |||
298 | /// <summary> | ||
299 | /// Called by the engine, raises the <see cref="SystemShutdown"/> event. | ||
300 | /// </summary> | ||
301 | /// <param name="args">Additional arguments for this event.</param> | ||
302 | protected virtual void OnSystemShutdown(SystemShutdownEventArgs args) | ||
303 | { | ||
304 | EventHandler<SystemShutdownEventArgs> handler = this.SystemShutdown; | ||
305 | if (null != handler) | ||
306 | { | ||
307 | handler(this, args); | ||
308 | } | ||
309 | else if (null != args) | ||
310 | { | ||
311 | // Allow requests to shut down when critical or not applying. | ||
312 | bool critical = EndSessionReasons.Critical == (EndSessionReasons.Critical & args.Reasons); | ||
313 | args.Cancel = !critical && this.applying; | ||
314 | } | ||
315 | } | ||
316 | |||
317 | /// <summary> | ||
318 | /// Called by the engine, raises the <see cref="DetectBegin"/> event. | ||
319 | /// </summary> | ||
320 | /// <param name="args">Additional arguments for this event.</param> | ||
321 | protected virtual void OnDetectBegin(DetectBeginEventArgs args) | ||
322 | { | ||
323 | EventHandler<DetectBeginEventArgs> handler = this.DetectBegin; | ||
324 | if (null != handler) | ||
325 | { | ||
326 | handler(this, args); | ||
327 | } | ||
328 | } | ||
329 | |||
330 | /// <summary> | ||
331 | /// Called by the engine, raises the <see cref="DetectForwardCompatibleBundle"/> event. | ||
332 | /// </summary> | ||
333 | /// <param name="args">Additional arguments for this event.</param> | ||
334 | protected virtual void OnDetectForwardCompatibleBundle(DetectForwardCompatibleBundleEventArgs args) | ||
335 | { | ||
336 | EventHandler<DetectForwardCompatibleBundleEventArgs> handler = this.DetectForwardCompatibleBundle; | ||
337 | if (null != handler) | ||
338 | { | ||
339 | handler(this, args); | ||
340 | } | ||
341 | } | ||
342 | |||
343 | /// <summary> | ||
344 | /// Called by the engine, raises the <see cref="DetectUpdateBegin"/> event. | ||
345 | /// </summary> | ||
346 | /// <param name="args">Additional arguments for this event.</param> | ||
347 | protected virtual void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) | ||
348 | { | ||
349 | EventHandler<DetectUpdateBeginEventArgs> handler = this.DetectUpdateBegin; | ||
350 | if (null != handler) | ||
351 | { | ||
352 | handler(this, args); | ||
353 | } | ||
354 | } | ||
355 | |||
356 | /// <summary> | ||
357 | /// Called by the engine, raises the <see cref="DetectUpdate"/> event. | ||
358 | /// </summary> | ||
359 | /// <param name="args">Additional arguments for this event.</param> | ||
360 | protected virtual void OnDetectUpdate(DetectUpdateEventArgs args) | ||
361 | { | ||
362 | EventHandler<DetectUpdateEventArgs> handler = this.DetectUpdate; | ||
363 | if (null != handler) | ||
364 | { | ||
365 | handler(this, args); | ||
366 | } | ||
367 | } | ||
368 | |||
369 | /// <summary> | ||
370 | /// Called by the engine, raises the <see cref="DetectUpdateComplete"/> event. | ||
371 | /// </summary> | ||
372 | /// <param name="args">Additional arguments for this event.</param> | ||
373 | protected virtual void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs args) | ||
374 | { | ||
375 | EventHandler<DetectUpdateCompleteEventArgs> handler = this.DetectUpdateComplete; | ||
376 | if (null != handler) | ||
377 | { | ||
378 | handler(this, args); | ||
379 | } | ||
380 | } | ||
381 | |||
382 | /// <summary> | ||
383 | /// Called by the engine, raises the <see cref="DetectRelatedBundle"/> event. | ||
384 | /// </summary> | ||
385 | /// <param name="args">Additional arguments for this event.</param> | ||
386 | protected virtual void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args) | ||
387 | { | ||
388 | EventHandler<DetectRelatedBundleEventArgs> handler = this.DetectRelatedBundle; | ||
389 | if (null != handler) | ||
390 | { | ||
391 | handler(this, args); | ||
392 | } | ||
393 | } | ||
394 | |||
395 | /// <summary> | ||
396 | /// Called by the engine, raises the <see cref="DetectPackageBegin"/> event. | ||
397 | /// </summary> | ||
398 | /// <param name="args">Additional arguments for this event.</param> | ||
399 | protected virtual void OnDetectPackageBegin(DetectPackageBeginEventArgs args) | ||
400 | { | ||
401 | EventHandler<DetectPackageBeginEventArgs> handler = this.DetectPackageBegin; | ||
402 | if (null != handler) | ||
403 | { | ||
404 | handler(this, args); | ||
405 | } | ||
406 | } | ||
407 | |||
408 | /// <summary> | ||
409 | /// Called by the engine, raises the <see cref="DetectRelatedMsiPackage"/> event. | ||
410 | /// </summary> | ||
411 | /// <param name="args">Additional arguments for this event.</param> | ||
412 | protected virtual void OnDetectRelatedMsiPackage(DetectRelatedMsiPackageEventArgs args) | ||
413 | { | ||
414 | EventHandler<DetectRelatedMsiPackageEventArgs> handler = this.DetectRelatedMsiPackage; | ||
415 | if (null != handler) | ||
416 | { | ||
417 | handler(this, args); | ||
418 | } | ||
419 | } | ||
420 | |||
421 | /// <summary> | ||
422 | /// Called by the engine, raises the <see cref="DetectPatchTarget"/> event. | ||
423 | /// </summary> | ||
424 | /// <param name="args">Additional arguments for this event.</param> | ||
425 | protected virtual void OnDetectPatchTarget(DetectPatchTargetEventArgs args) | ||
426 | { | ||
427 | EventHandler<DetectPatchTargetEventArgs> handler = this.DetectPatchTarget; | ||
428 | if (null != handler) | ||
429 | { | ||
430 | handler(this, args); | ||
431 | } | ||
432 | } | ||
433 | |||
434 | /// <summary> | ||
435 | /// Called by the engine, raises the <see cref="DetectMsiFeature"/> event. | ||
436 | /// </summary> | ||
437 | /// <param name="args">Additional arguments for this event.</param> | ||
438 | protected virtual void OnDetectMsiFeature(DetectMsiFeatureEventArgs args) | ||
439 | { | ||
440 | EventHandler<DetectMsiFeatureEventArgs> handler = this.DetectMsiFeature; | ||
441 | if (null != handler) | ||
442 | { | ||
443 | handler(this, args); | ||
444 | } | ||
445 | } | ||
446 | |||
447 | /// <summary> | ||
448 | /// Called by the engine, raises the <see cref="DetectPackageComplete"/> event. | ||
449 | /// </summary> | ||
450 | /// <param name="args">Additional arguments for this event.</param> | ||
451 | protected virtual void OnDetectPackageComplete(DetectPackageCompleteEventArgs args) | ||
452 | { | ||
453 | EventHandler<DetectPackageCompleteEventArgs> handler = this.DetectPackageComplete; | ||
454 | if (null != handler) | ||
455 | { | ||
456 | handler(this, args); | ||
457 | } | ||
458 | } | ||
459 | |||
460 | /// <summary> | ||
461 | /// Called by the engine, raises the <see cref="DetectComplete"/> event. | ||
462 | /// </summary> | ||
463 | /// <param name="args">Additional arguments for this event.</param> | ||
464 | protected virtual void OnDetectComplete(DetectCompleteEventArgs args) | ||
465 | { | ||
466 | EventHandler<DetectCompleteEventArgs> handler = this.DetectComplete; | ||
467 | if (null != handler) | ||
468 | { | ||
469 | handler(this, args); | ||
470 | } | ||
471 | } | ||
472 | |||
473 | /// <summary> | ||
474 | /// Called by the engine, raises the <see cref="PlanBegin"/> event. | ||
475 | /// </summary> | ||
476 | /// <param name="args">Additional arguments for this event.</param> | ||
477 | protected virtual void OnPlanBegin(PlanBeginEventArgs args) | ||
478 | { | ||
479 | EventHandler<PlanBeginEventArgs> handler = this.PlanBegin; | ||
480 | if (null != handler) | ||
481 | { | ||
482 | handler(this, args); | ||
483 | } | ||
484 | } | ||
485 | |||
486 | /// <summary> | ||
487 | /// Called by the engine, raises the <see cref="PlanRelatedBundle"/> event. | ||
488 | /// </summary> | ||
489 | /// <param name="args">Additional arguments for this event.</param> | ||
490 | protected virtual void OnPlanRelatedBundle(PlanRelatedBundleEventArgs args) | ||
491 | { | ||
492 | EventHandler<PlanRelatedBundleEventArgs> handler = this.PlanRelatedBundle; | ||
493 | if (null != handler) | ||
494 | { | ||
495 | handler(this, args); | ||
496 | } | ||
497 | } | ||
498 | |||
499 | /// <summary> | ||
500 | /// Called by the engine, raises the <see cref="PlanPackageBegin"/> event. | ||
501 | /// </summary> | ||
502 | /// <param name="args">Additional arguments for this event.</param> | ||
503 | protected virtual void OnPlanPackageBegin(PlanPackageBeginEventArgs args) | ||
504 | { | ||
505 | EventHandler<PlanPackageBeginEventArgs> handler = this.PlanPackageBegin; | ||
506 | if (null != handler) | ||
507 | { | ||
508 | handler(this, args); | ||
509 | } | ||
510 | } | ||
511 | |||
512 | /// <summary> | ||
513 | /// Called by the engine, raises the <see cref="PlanPatchTarget"/> event. | ||
514 | /// </summary> | ||
515 | /// <param name="args">Additional arguments for this event.</param> | ||
516 | protected virtual void OnPlanPatchTarget(PlanPatchTargetEventArgs args) | ||
517 | { | ||
518 | EventHandler<PlanPatchTargetEventArgs> handler = this.PlanPatchTarget; | ||
519 | if (null != handler) | ||
520 | { | ||
521 | handler(this, args); | ||
522 | } | ||
523 | } | ||
524 | |||
525 | /// <summary> | ||
526 | /// Called by the engine, raises the <see cref="PlanMsiFeature"/> event. | ||
527 | /// </summary> | ||
528 | /// <param name="args">Additional arguments for this event.</param> | ||
529 | protected virtual void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) | ||
530 | { | ||
531 | EventHandler<PlanMsiFeatureEventArgs> handler = this.PlanMsiFeature; | ||
532 | if (null != handler) | ||
533 | { | ||
534 | handler(this, args); | ||
535 | } | ||
536 | } | ||
537 | |||
538 | /// <summary> | ||
539 | /// Called by the engine, raises the <see cref="PlanMsiPackage"/> event. | ||
540 | /// </summary> | ||
541 | /// <param name="args">Additional arguments for this event.</param> | ||
542 | protected virtual void OnPlanMsiPackage(PlanMsiPackageEventArgs args) | ||
543 | { | ||
544 | EventHandler<PlanMsiPackageEventArgs> handler = this.PlanMsiPackage; | ||
545 | if (null != handler) | ||
546 | { | ||
547 | handler(this, args); | ||
548 | } | ||
549 | } | ||
550 | |||
551 | /// <summary> | ||
552 | /// Called by the engine, raises the <see cref="PlanPackageComplete"/> event. | ||
553 | /// </summary> | ||
554 | /// <param name="args">Additional arguments for this event.</param> | ||
555 | protected virtual void OnPlanPackageComplete(PlanPackageCompleteEventArgs args) | ||
556 | { | ||
557 | EventHandler<PlanPackageCompleteEventArgs> handler = this.PlanPackageComplete; | ||
558 | if (null != handler) | ||
559 | { | ||
560 | handler(this, args); | ||
561 | } | ||
562 | } | ||
563 | |||
564 | /// <summary> | ||
565 | /// Called by the engine, raises the <see cref="PlannedPackage"/> event. | ||
566 | /// </summary> | ||
567 | /// <param name="args">Additional arguments for this event.</param> | ||
568 | protected virtual void OnPlannedPackage(PlannedPackageEventArgs args) | ||
569 | { | ||
570 | EventHandler<PlannedPackageEventArgs> handler = this.PlannedPackage; | ||
571 | if (null != handler) | ||
572 | { | ||
573 | handler(this, args); | ||
574 | } | ||
575 | } | ||
576 | |||
577 | /// <summary> | ||
578 | /// Called by the engine, raises the <see cref="PlanComplete"/> event. | ||
579 | /// </summary> | ||
580 | /// <param name="args">Additional arguments for this event.</param> | ||
581 | protected virtual void OnPlanComplete(PlanCompleteEventArgs args) | ||
582 | { | ||
583 | EventHandler<PlanCompleteEventArgs> handler = this.PlanComplete; | ||
584 | if (null != handler) | ||
585 | { | ||
586 | handler(this, args); | ||
587 | } | ||
588 | } | ||
589 | |||
590 | /// <summary> | ||
591 | /// Called by the engine, raises the <see cref="ApplyBegin"/> event. | ||
592 | /// </summary> | ||
593 | /// <param name="args">Additional arguments for this event.</param> | ||
594 | protected virtual void OnApplyBegin(ApplyBeginEventArgs args) | ||
595 | { | ||
596 | EventHandler<ApplyBeginEventArgs> handler = this.ApplyBegin; | ||
597 | if (null != handler) | ||
598 | { | ||
599 | handler(this, args); | ||
600 | } | ||
601 | } | ||
602 | |||
603 | /// <summary> | ||
604 | /// Called by the engine, raises the <see cref="ElevateBegin"/> event. | ||
605 | /// </summary> | ||
606 | /// <param name="args">Additional arguments for this event.</param> | ||
607 | protected virtual void OnElevateBegin(ElevateBeginEventArgs args) | ||
608 | { | ||
609 | EventHandler<ElevateBeginEventArgs> handler = this.ElevateBegin; | ||
610 | if (null != handler) | ||
611 | { | ||
612 | handler(this, args); | ||
613 | } | ||
614 | } | ||
615 | |||
616 | /// <summary> | ||
617 | /// Called by the engine, raises the <see cref="ElevateComplete"/> event. | ||
618 | /// </summary> | ||
619 | /// <param name="args">Additional arguments for this event.</param> | ||
620 | protected virtual void OnElevateComplete(ElevateCompleteEventArgs args) | ||
621 | { | ||
622 | EventHandler<ElevateCompleteEventArgs> handler = this.ElevateComplete; | ||
623 | if (null != handler) | ||
624 | { | ||
625 | handler(this, args); | ||
626 | } | ||
627 | } | ||
628 | |||
629 | /// <summary> | ||
630 | /// Called by the engine, raises the <see cref="Progress"/> event. | ||
631 | /// </summary> | ||
632 | /// <param name="args">Additional arguments for this event.</param> | ||
633 | protected virtual void OnProgress(ProgressEventArgs args) | ||
634 | { | ||
635 | EventHandler<ProgressEventArgs> handler = this.Progress; | ||
636 | if (null != handler) | ||
637 | { | ||
638 | handler(this, args); | ||
639 | } | ||
640 | } | ||
641 | |||
642 | /// <summary> | ||
643 | /// Called by the engine, raises the <see cref="Error"/> event. | ||
644 | /// </summary> | ||
645 | /// <param name="args">Additional arguments for this event.</param> | ||
646 | protected virtual void OnError(ErrorEventArgs args) | ||
647 | { | ||
648 | EventHandler<ErrorEventArgs> handler = this.Error; | ||
649 | if (null != handler) | ||
650 | { | ||
651 | handler(this, args); | ||
652 | } | ||
653 | } | ||
654 | |||
655 | /// <summary> | ||
656 | /// Called by the engine, raises the <see cref="RegisterBegin"/> event. | ||
657 | /// </summary> | ||
658 | /// <param name="args">Additional arguments for this event.</param> | ||
659 | protected virtual void OnRegisterBegin(RegisterBeginEventArgs args) | ||
660 | { | ||
661 | EventHandler<RegisterBeginEventArgs> handler = this.RegisterBegin; | ||
662 | if (null != handler) | ||
663 | { | ||
664 | handler(this, args); | ||
665 | } | ||
666 | } | ||
667 | |||
668 | /// <summary> | ||
669 | /// Called by the engine, raises the <see cref="RegisterComplete"/> event. | ||
670 | /// </summary> | ||
671 | /// <param name="args">Additional arguments for this event.</param> | ||
672 | protected virtual void OnRegisterComplete(RegisterCompleteEventArgs args) | ||
673 | { | ||
674 | EventHandler<RegisterCompleteEventArgs> handler = this.RegisterComplete; | ||
675 | if (null != handler) | ||
676 | { | ||
677 | handler(this, args); | ||
678 | } | ||
679 | } | ||
680 | |||
681 | /// <summary> | ||
682 | /// Called by the engine, raises the <see cref="UnregisterBegin"/> event. | ||
683 | /// </summary> | ||
684 | /// <param name="args">Additional arguments for this event.</param> | ||
685 | protected virtual void OnUnregisterBegin(UnregisterBeginEventArgs args) | ||
686 | { | ||
687 | EventHandler<UnregisterBeginEventArgs> handler = this.UnregisterBegin; | ||
688 | if (null != handler) | ||
689 | { | ||
690 | handler(this, args); | ||
691 | } | ||
692 | } | ||
693 | |||
694 | /// <summary> | ||
695 | /// Called by the engine, raises the <see cref="UnregisterComplete"/> event. | ||
696 | /// </summary> | ||
697 | /// <param name="args">Additional arguments for this event.</param> | ||
698 | protected virtual void OnUnregisterComplete(UnregisterCompleteEventArgs args) | ||
699 | { | ||
700 | EventHandler<UnregisterCompleteEventArgs> handler = this.UnregisterComplete; | ||
701 | if (null != handler) | ||
702 | { | ||
703 | handler(this, args); | ||
704 | } | ||
705 | } | ||
706 | |||
707 | /// <summary> | ||
708 | /// Called by the engine, raises the <see cref="CacheBegin"/> event. | ||
709 | /// </summary> | ||
710 | /// <param name="args"></param> | ||
711 | protected virtual void OnCacheBegin(CacheBeginEventArgs args) | ||
712 | { | ||
713 | EventHandler<CacheBeginEventArgs> handler = this.CacheBegin; | ||
714 | if (null != handler) | ||
715 | { | ||
716 | handler(this, args); | ||
717 | } | ||
718 | } | ||
719 | |||
720 | /// <summary> | ||
721 | /// Called by the engine, raises the <see cref="CachePackageBegin"/> event. | ||
722 | /// </summary> | ||
723 | /// <param name="args"></param> | ||
724 | protected virtual void OnCachePackageBegin(CachePackageBeginEventArgs args) | ||
725 | { | ||
726 | EventHandler<CachePackageBeginEventArgs> handler = this.CachePackageBegin; | ||
727 | if (null != handler) | ||
728 | { | ||
729 | handler(this, args); | ||
730 | } | ||
731 | } | ||
732 | |||
733 | /// <summary> | ||
734 | /// Called by the engine, raises the <see cref="CacheAcquireBegin"/> event. | ||
735 | /// </summary> | ||
736 | /// <param name="args"></param> | ||
737 | protected virtual void OnCacheAcquireBegin(CacheAcquireBeginEventArgs args) | ||
738 | { | ||
739 | EventHandler<CacheAcquireBeginEventArgs> handler = this.CacheAcquireBegin; | ||
740 | if (null != handler) | ||
741 | { | ||
742 | handler(this, args); | ||
743 | } | ||
744 | } | ||
745 | |||
746 | /// <summary> | ||
747 | /// Called by the engine, raises the <see cref="CacheAcquireProgress"/> event. | ||
748 | /// </summary> | ||
749 | /// <param name="args"></param> | ||
750 | protected virtual void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) | ||
751 | { | ||
752 | EventHandler<CacheAcquireProgressEventArgs> handler = this.CacheAcquireProgress; | ||
753 | if (null != handler) | ||
754 | { | ||
755 | handler(this, args); | ||
756 | } | ||
757 | } | ||
758 | |||
759 | /// <summary> | ||
760 | /// Called by the engine, raises the <see cref="CacheAcquireResolving"/> event. | ||
761 | /// </summary> | ||
762 | /// <param name="args">Additional arguments for this event.</param> | ||
763 | protected virtual void OnCacheAcquireResolving(CacheAcquireResolvingEventArgs args) | ||
764 | { | ||
765 | EventHandler<CacheAcquireResolvingEventArgs> handler = this.CacheAcquireResolving; | ||
766 | if (null != handler) | ||
767 | { | ||
768 | handler(this, args); | ||
769 | } | ||
770 | } | ||
771 | |||
772 | /// <summary> | ||
773 | /// Called by the engine, raises the <see cref="CacheAcquireComplete"/> event. | ||
774 | /// </summary> | ||
775 | /// <param name="args"></param> | ||
776 | protected virtual void OnCacheAcquireComplete(CacheAcquireCompleteEventArgs args) | ||
777 | { | ||
778 | EventHandler<CacheAcquireCompleteEventArgs> handler = this.CacheAcquireComplete; | ||
779 | if (null != handler) | ||
780 | { | ||
781 | handler(this, args); | ||
782 | } | ||
783 | } | ||
784 | |||
785 | /// <summary> | ||
786 | /// Called by the engine, raises the <see cref="CacheVerifyBegin"/> event. | ||
787 | /// </summary> | ||
788 | /// <param name="args"></param> | ||
789 | protected virtual void OnCacheVerifyBegin(CacheVerifyBeginEventArgs args) | ||
790 | { | ||
791 | EventHandler<CacheVerifyBeginEventArgs> handler = this.CacheVerifyBegin; | ||
792 | if (null != handler) | ||
793 | { | ||
794 | handler(this, args); | ||
795 | } | ||
796 | } | ||
797 | |||
798 | /// <summary> | ||
799 | /// Called by the engine, raises the <see cref="CacheVerifyProgress"/> event. | ||
800 | /// </summary> | ||
801 | /// <param name="args"></param> | ||
802 | protected virtual void OnCacheVerifyProgress(CacheVerifyProgressEventArgs args) | ||
803 | { | ||
804 | EventHandler<CacheVerifyProgressEventArgs> handler = this.CacheVerifyProgress; | ||
805 | if (null != handler) | ||
806 | { | ||
807 | handler(this, args); | ||
808 | } | ||
809 | } | ||
810 | |||
811 | /// <summary> | ||
812 | /// Called by the engine, raises the <see cref="CacheVerifyComplete"/> event. | ||
813 | /// </summary> | ||
814 | /// <param name="args"></param> | ||
815 | protected virtual void OnCacheVerifyComplete(CacheVerifyCompleteEventArgs args) | ||
816 | { | ||
817 | EventHandler<CacheVerifyCompleteEventArgs> handler = this.CacheVerifyComplete; | ||
818 | if (null != handler) | ||
819 | { | ||
820 | handler(this, args); | ||
821 | } | ||
822 | } | ||
823 | |||
824 | /// <summary> | ||
825 | /// Called by the engine, raises the <see cref="CachePackageComplete"/> event. | ||
826 | /// </summary> | ||
827 | /// <param name="args"></param> | ||
828 | protected virtual void OnCachePackageComplete(CachePackageCompleteEventArgs args) | ||
829 | { | ||
830 | EventHandler<CachePackageCompleteEventArgs> handler = this.CachePackageComplete; | ||
831 | if (null != handler) | ||
832 | { | ||
833 | handler(this, args); | ||
834 | } | ||
835 | } | ||
836 | |||
837 | /// <summary> | ||
838 | /// Called by the engine, raises the <see cref="CacheComplete"/> event. | ||
839 | /// </summary> | ||
840 | /// <param name="args">Additional arguments for this event.</param> | ||
841 | protected virtual void OnCacheComplete(CacheCompleteEventArgs args) | ||
842 | { | ||
843 | EventHandler<CacheCompleteEventArgs> handler = this.CacheComplete; | ||
844 | if (null != handler) | ||
845 | { | ||
846 | handler(this, args); | ||
847 | } | ||
848 | } | ||
849 | |||
850 | /// <summary> | ||
851 | /// Called by the engine, raises the <see cref="ExecuteBegin"/> event. | ||
852 | /// </summary> | ||
853 | /// <param name="args">Additional arguments for this event.</param> | ||
854 | protected virtual void OnExecuteBegin(ExecuteBeginEventArgs args) | ||
855 | { | ||
856 | EventHandler<ExecuteBeginEventArgs> handler = this.ExecuteBegin; | ||
857 | if (null != handler) | ||
858 | { | ||
859 | handler(this, args); | ||
860 | } | ||
861 | } | ||
862 | |||
863 | /// <summary> | ||
864 | /// Called by the engine, raises the <see cref="ExecutePackageBegin"/> event. | ||
865 | /// </summary> | ||
866 | /// <param name="args">Additional arguments for this event.</param> | ||
867 | protected virtual void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) | ||
868 | { | ||
869 | EventHandler<ExecutePackageBeginEventArgs> handler = this.ExecutePackageBegin; | ||
870 | if (null != handler) | ||
871 | { | ||
872 | handler(this, args); | ||
873 | } | ||
874 | } | ||
875 | |||
876 | /// <summary> | ||
877 | /// Called by the engine, raises the <see cref="ExecutePatchTarget"/> event. | ||
878 | /// </summary> | ||
879 | /// <param name="args">Additional arguments for this event.</param> | ||
880 | protected virtual void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) | ||
881 | { | ||
882 | EventHandler<ExecutePatchTargetEventArgs> handler = this.ExecutePatchTarget; | ||
883 | if (null != handler) | ||
884 | { | ||
885 | handler(this, args); | ||
886 | } | ||
887 | } | ||
888 | |||
889 | /// <summary> | ||
890 | /// Called by the engine, raises the <see cref="ExecuteMsiMessage"/> event. | ||
891 | /// </summary> | ||
892 | /// <param name="args">Additional arguments for this event.</param> | ||
893 | protected virtual void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) | ||
894 | { | ||
895 | EventHandler<ExecuteMsiMessageEventArgs> handler = this.ExecuteMsiMessage; | ||
896 | if (null != handler) | ||
897 | { | ||
898 | handler(this, args); | ||
899 | } | ||
900 | } | ||
901 | |||
902 | /// <summary> | ||
903 | /// Called by the engine, raises the <see cref="ExecuteFilesInUse"/> event. | ||
904 | /// </summary> | ||
905 | /// <param name="args">Additional arguments for this event.</param> | ||
906 | protected virtual void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) | ||
907 | { | ||
908 | EventHandler<ExecuteFilesInUseEventArgs> handler = this.ExecuteFilesInUse; | ||
909 | if (null != handler) | ||
910 | { | ||
911 | handler(this, args); | ||
912 | } | ||
913 | } | ||
914 | |||
915 | /// <summary> | ||
916 | /// Called by the engine, raises the <see cref="ExecutePackageComplete"/> event. | ||
917 | /// </summary> | ||
918 | /// <param name="args">Additional arguments for this event.</param> | ||
919 | protected virtual void OnExecutePackageComplete(ExecutePackageCompleteEventArgs args) | ||
920 | { | ||
921 | EventHandler<ExecutePackageCompleteEventArgs> handler = this.ExecutePackageComplete; | ||
922 | if (null != handler) | ||
923 | { | ||
924 | handler(this, args); | ||
925 | } | ||
926 | } | ||
927 | |||
928 | /// <summary> | ||
929 | /// Called by the engine, raises the <see cref="ExecuteComplete"/> event. | ||
930 | /// </summary> | ||
931 | /// <param name="args">Additional arguments for this event.</param> | ||
932 | protected virtual void OnExecuteComplete(ExecuteCompleteEventArgs args) | ||
933 | { | ||
934 | EventHandler<ExecuteCompleteEventArgs> handler = this.ExecuteComplete; | ||
935 | if (null != handler) | ||
936 | { | ||
937 | handler(this, args); | ||
938 | } | ||
939 | } | ||
940 | |||
941 | /// <summary> | ||
942 | /// Called by the engine, raises the <see cref="ApplyComplete"/> event. | ||
943 | /// </summary> | ||
944 | /// <param name="args">Additional arguments for this event.</param> | ||
945 | protected virtual void OnApplyComplete(ApplyCompleteEventArgs args) | ||
946 | { | ||
947 | EventHandler<ApplyCompleteEventArgs> handler = this.ApplyComplete; | ||
948 | if (null != handler) | ||
949 | { | ||
950 | handler(this, args); | ||
951 | } | ||
952 | } | ||
953 | |||
954 | /// <summary> | ||
955 | /// Called by the engine, raises the <see cref="ExecuteProgress"/> event. | ||
956 | /// </summary> | ||
957 | /// <param name="args">Additional arguments for this event.</param> | ||
958 | protected virtual void OnExecuteProgress(ExecuteProgressEventArgs args) | ||
959 | { | ||
960 | EventHandler<ExecuteProgressEventArgs> handler = this.ExecuteProgress; | ||
961 | if (null != handler) | ||
962 | { | ||
963 | handler(this, args); | ||
964 | } | ||
965 | } | ||
966 | |||
967 | /// <summary> | ||
968 | /// Called by the engine, raises the <see cref="LaunchApprovedExeBegin"/> event. | ||
969 | /// </summary> | ||
970 | /// <param name="args">Additional arguments for this event.</param> | ||
971 | protected virtual void OnLaunchApprovedExeBegin(LaunchApprovedExeBeginEventArgs args) | ||
972 | { | ||
973 | EventHandler<LaunchApprovedExeBeginEventArgs> handler = this.LaunchApprovedExeBegin; | ||
974 | if (null != handler) | ||
975 | { | ||
976 | handler(this, args); | ||
977 | } | ||
978 | } | ||
979 | |||
980 | /// <summary> | ||
981 | /// Called by the engine, raises the <see cref="LaunchApprovedExeComplete"/> event. | ||
982 | /// </summary> | ||
983 | /// <param name="args">Additional arguments for this event.</param> | ||
984 | protected virtual void OnLaunchApprovedExeComplete(LaunchApprovedExeCompleteEventArgs args) | ||
985 | { | ||
986 | EventHandler<LaunchApprovedExeCompleteEventArgs> handler = this.LaunchApprovedExeComplete; | ||
987 | if (null != handler) | ||
988 | { | ||
989 | handler(this, args); | ||
990 | } | ||
991 | } | ||
992 | |||
993 | /// <summary> | ||
994 | /// Called by the engine, raises the <see cref="BeginMsiTransactionBegin"/> event. | ||
995 | /// </summary> | ||
996 | /// <param name="args">Additional arguments for this event.</param> | ||
997 | protected virtual void OnBeginMsiTransactionBegin(BeginMsiTransactionBeginEventArgs args) | ||
998 | { | ||
999 | EventHandler<BeginMsiTransactionBeginEventArgs> handler = this.BeginMsiTransactionBegin; | ||
1000 | if (null != handler) | ||
1001 | { | ||
1002 | handler(this, args); | ||
1003 | } | ||
1004 | } | ||
1005 | |||
1006 | /// <summary> | ||
1007 | /// Called by the engine, raises the <see cref="BeginMsiTransactionComplete"/> event. | ||
1008 | /// </summary> | ||
1009 | /// <param name="args">Additional arguments for this event.</param> | ||
1010 | protected virtual void OnBeginMsiTransactionComplete(BeginMsiTransactionCompleteEventArgs args) | ||
1011 | { | ||
1012 | EventHandler<BeginMsiTransactionCompleteEventArgs> handler = this.BeginMsiTransactionComplete; | ||
1013 | if (null != handler) | ||
1014 | { | ||
1015 | handler(this, args); | ||
1016 | } | ||
1017 | } | ||
1018 | |||
1019 | /// <summary> | ||
1020 | /// Called by the engine, raises the <see cref="CommitMsiTransactionBegin"/> event. | ||
1021 | /// </summary> | ||
1022 | /// <param name="args">Additional arguments for this event.</param> | ||
1023 | protected virtual void OnCommitMsiTransactionBegin(CommitMsiTransactionBeginEventArgs args) | ||
1024 | { | ||
1025 | EventHandler<CommitMsiTransactionBeginEventArgs> handler = this.CommitMsiTransactionBegin; | ||
1026 | if (null != handler) | ||
1027 | { | ||
1028 | handler(this, args); | ||
1029 | } | ||
1030 | } | ||
1031 | |||
1032 | /// <summary> | ||
1033 | /// Called by the engine, raises the <see cref="CommitMsiTransactionComplete"/> event. | ||
1034 | /// </summary> | ||
1035 | /// <param name="args">Additional arguments for this event.</param> | ||
1036 | protected virtual void OnCommitMsiTransactionComplete(CommitMsiTransactionCompleteEventArgs args) | ||
1037 | { | ||
1038 | EventHandler<CommitMsiTransactionCompleteEventArgs> handler = this.CommitMsiTransactionComplete; | ||
1039 | if (null != handler) | ||
1040 | { | ||
1041 | handler(this, args); | ||
1042 | } | ||
1043 | } | ||
1044 | |||
1045 | /// <summary> | ||
1046 | /// Called by the engine, raises the <see cref="RollbackMsiTransactionBegin"/> event. | ||
1047 | /// </summary> | ||
1048 | /// <param name="args">Additional arguments for this event.</param> | ||
1049 | protected virtual void OnRollbackMsiTransactionBegin(RollbackMsiTransactionBeginEventArgs args) | ||
1050 | { | ||
1051 | EventHandler<RollbackMsiTransactionBeginEventArgs> handler = this.RollbackMsiTransactionBegin; | ||
1052 | if (null != handler) | ||
1053 | { | ||
1054 | handler(this, args); | ||
1055 | } | ||
1056 | } | ||
1057 | |||
1058 | /// <summary> | ||
1059 | /// Called by the engine, raises the <see cref="RollbackMsiTransactionComplete"/> event. | ||
1060 | /// </summary> | ||
1061 | /// <param name="args">Additional arguments for this event.</param> | ||
1062 | protected virtual void OnRollbackMsiTransactionComplete(RollbackMsiTransactionCompleteEventArgs args) | ||
1063 | { | ||
1064 | EventHandler<RollbackMsiTransactionCompleteEventArgs> handler = this.RollbackMsiTransactionComplete; | ||
1065 | if (null != handler) | ||
1066 | { | ||
1067 | handler(this, args); | ||
1068 | } | ||
1069 | } | ||
1070 | |||
1071 | /// <summary> | ||
1072 | /// Called by the engine, raises the <see cref="PauseAutomaticUpdatesBegin"/> event. | ||
1073 | /// </summary> | ||
1074 | /// <param name="args">Additional arguments for this event.</param> | ||
1075 | protected virtual void OnPauseAutomaticUpdatesBegin(PauseAutomaticUpdatesBeginEventArgs args) | ||
1076 | { | ||
1077 | EventHandler<PauseAutomaticUpdatesBeginEventArgs> handler = this.PauseAutomaticUpdatesBegin; | ||
1078 | if (null != handler) | ||
1079 | { | ||
1080 | handler(this, args); | ||
1081 | } | ||
1082 | } | ||
1083 | |||
1084 | /// <summary> | ||
1085 | /// Called by the engine, raises the <see cref="PauseAutomaticUpdatesComplete"/> event. | ||
1086 | /// </summary> | ||
1087 | /// <param name="args">Additional arguments for this event.</param> | ||
1088 | protected virtual void OnPauseAutomaticUpdatesComplete(PauseAutomaticUpdatesCompleteEventArgs args) | ||
1089 | { | ||
1090 | EventHandler<PauseAutomaticUpdatesCompleteEventArgs> handler = this.PauseAutomaticUpdatesComplete; | ||
1091 | if (null != handler) | ||
1092 | { | ||
1093 | handler(this, args); | ||
1094 | } | ||
1095 | } | ||
1096 | |||
1097 | /// <summary> | ||
1098 | /// Called by the engine, raises the <see cref="SystemRestorePointBegin"/> event. | ||
1099 | /// </summary> | ||
1100 | /// <param name="args">Additional arguments for this event.</param> | ||
1101 | protected virtual void OnSystemRestorePointBegin(SystemRestorePointBeginEventArgs args) | ||
1102 | { | ||
1103 | EventHandler<SystemRestorePointBeginEventArgs> handler = this.SystemRestorePointBegin; | ||
1104 | if (null != handler) | ||
1105 | { | ||
1106 | handler(this, args); | ||
1107 | } | ||
1108 | } | ||
1109 | |||
1110 | /// <summary> | ||
1111 | /// Called by the engine, raises the <see cref="SystemRestorePointComplete"/> event. | ||
1112 | /// </summary> | ||
1113 | /// <param name="args">Additional arguments for this event.</param> | ||
1114 | protected virtual void OnSystemRestorePointComplete(SystemRestorePointCompleteEventArgs args) | ||
1115 | { | ||
1116 | EventHandler<SystemRestorePointCompleteEventArgs> handler = this.SystemRestorePointComplete; | ||
1117 | if (null != handler) | ||
1118 | { | ||
1119 | handler(this, args); | ||
1120 | } | ||
1121 | } | ||
1122 | |||
1123 | /// <summary> | ||
1124 | /// Called by the engine, raises the <see cref="PlanForwardCompatibleBundle"/> event. | ||
1125 | /// </summary> | ||
1126 | protected virtual void OnPlanForwardCompatibleBundle(PlanForwardCompatibleBundleEventArgs args) | ||
1127 | { | ||
1128 | EventHandler<PlanForwardCompatibleBundleEventArgs> handler = this.PlanForwardCompatibleBundle; | ||
1129 | if (null != handler) | ||
1130 | { | ||
1131 | handler(this, args); | ||
1132 | } | ||
1133 | } | ||
1134 | |||
1135 | /// <summary> | ||
1136 | /// Called by the engine, raises the <see cref="CacheContainerOrPayloadVerifyBegin"/> event. | ||
1137 | /// </summary> | ||
1138 | /// <param name="args"></param> | ||
1139 | protected virtual void OnCacheContainerOrPayloadVerifyBegin(CacheContainerOrPayloadVerifyBeginEventArgs args) | ||
1140 | { | ||
1141 | EventHandler<CacheContainerOrPayloadVerifyBeginEventArgs> handler = this.CacheContainerOrPayloadVerifyBegin; | ||
1142 | if (null != handler) | ||
1143 | { | ||
1144 | handler(this, args); | ||
1145 | } | ||
1146 | } | ||
1147 | |||
1148 | /// <summary> | ||
1149 | /// Called by the engine, raises the <see cref="CacheContainerOrPayloadVerifyProgress"/> event. | ||
1150 | /// </summary> | ||
1151 | /// <param name="args"></param> | ||
1152 | protected virtual void OnCacheContainerOrPayloadVerifyProgress(CacheContainerOrPayloadVerifyProgressEventArgs args) | ||
1153 | { | ||
1154 | EventHandler<CacheContainerOrPayloadVerifyProgressEventArgs> handler = this.CacheContainerOrPayloadVerifyProgress; | ||
1155 | if (null != handler) | ||
1156 | { | ||
1157 | handler(this, args); | ||
1158 | } | ||
1159 | } | ||
1160 | |||
1161 | /// <summary> | ||
1162 | /// Called by the engine, raises the <see cref="CacheContainerOrPayloadVerifyComplete"/> event. | ||
1163 | /// </summary> | ||
1164 | /// <param name="args"></param> | ||
1165 | protected virtual void OnCacheContainerOrPayloadVerifyComplete(CacheContainerOrPayloadVerifyCompleteEventArgs args) | ||
1166 | { | ||
1167 | EventHandler<CacheContainerOrPayloadVerifyCompleteEventArgs> handler = this.CacheContainerOrPayloadVerifyComplete; | ||
1168 | if (null != handler) | ||
1169 | { | ||
1170 | handler(this, args); | ||
1171 | } | ||
1172 | } | ||
1173 | |||
1174 | /// <summary> | ||
1175 | /// Called by the engine, raises the <see cref="CachePayloadExtractBegin"/> event. | ||
1176 | /// </summary> | ||
1177 | /// <param name="args"></param> | ||
1178 | protected virtual void OnCachePayloadExtractBegin(CachePayloadExtractBeginEventArgs args) | ||
1179 | { | ||
1180 | EventHandler<CachePayloadExtractBeginEventArgs> handler = this.CachePayloadExtractBegin; | ||
1181 | if (null != handler) | ||
1182 | { | ||
1183 | handler(this, args); | ||
1184 | } | ||
1185 | } | ||
1186 | |||
1187 | /// <summary> | ||
1188 | /// Called by the engine, raises the <see cref="CachePayloadExtractProgress"/> event. | ||
1189 | /// </summary> | ||
1190 | /// <param name="args"></param> | ||
1191 | protected virtual void OnCachePayloadExtractProgress(CachePayloadExtractProgressEventArgs args) | ||
1192 | { | ||
1193 | EventHandler<CachePayloadExtractProgressEventArgs> handler = this.CachePayloadExtractProgress; | ||
1194 | if (null != handler) | ||
1195 | { | ||
1196 | handler(this, args); | ||
1197 | } | ||
1198 | } | ||
1199 | |||
1200 | /// <summary> | ||
1201 | /// Called by the engine, raises the <see cref="CachePayloadExtractComplete"/> event. | ||
1202 | /// </summary> | ||
1203 | /// <param name="args"></param> | ||
1204 | protected virtual void OnCachePayloadExtractComplete(CachePayloadExtractCompleteEventArgs args) | ||
1205 | { | ||
1206 | EventHandler<CachePayloadExtractCompleteEventArgs> handler = this.CachePayloadExtractComplete; | ||
1207 | if (null != handler) | ||
1208 | { | ||
1209 | handler(this, args); | ||
1210 | } | ||
1211 | } | ||
1212 | |||
1213 | #region IBootstrapperApplication Members | ||
1214 | |||
1215 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) | ||
1216 | { | ||
1217 | switch (message) | ||
1218 | { | ||
1219 | default: | ||
1220 | return NativeMethods.E_NOTIMPL; | ||
1221 | } | ||
1222 | } | ||
1223 | |||
1224 | void IBootstrapperApplication.BAProcFallback(int message, IntPtr pvArgs, IntPtr pvResults, ref int phr, IntPtr pvContext) | ||
1225 | { | ||
1226 | } | ||
1227 | |||
1228 | int IBootstrapperApplication.OnStartup() | ||
1229 | { | ||
1230 | StartupEventArgs args = new StartupEventArgs(); | ||
1231 | this.OnStartup(args); | ||
1232 | |||
1233 | return args.HResult; | ||
1234 | } | ||
1235 | |||
1236 | int IBootstrapperApplication.OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action) | ||
1237 | { | ||
1238 | ShutdownEventArgs args = new ShutdownEventArgs(action); | ||
1239 | this.OnShutdown(args); | ||
1240 | |||
1241 | action = args.Action; | ||
1242 | return args.HResult; | ||
1243 | } | ||
1244 | |||
1245 | int IBootstrapperApplication.OnSystemShutdown(EndSessionReasons dwEndSession, ref bool fCancel) | ||
1246 | { | ||
1247 | SystemShutdownEventArgs args = new SystemShutdownEventArgs(dwEndSession, fCancel); | ||
1248 | this.OnSystemShutdown(args); | ||
1249 | |||
1250 | fCancel = args.Cancel; | ||
1251 | return args.HResult; | ||
1252 | } | ||
1253 | |||
1254 | int IBootstrapperApplication.OnDetectBegin(bool fCached, bool fInstalled, int cPackages, ref bool fCancel) | ||
1255 | { | ||
1256 | DetectBeginEventArgs args = new DetectBeginEventArgs(fCached, fInstalled, cPackages, fCancel); | ||
1257 | this.OnDetectBegin(args); | ||
1258 | |||
1259 | fCancel = args.Cancel; | ||
1260 | return args.HResult; | ||
1261 | } | ||
1262 | |||
1263 | int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel) | ||
1264 | { | ||
1265 | DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel); | ||
1266 | this.OnDetectForwardCompatibleBundle(args); | ||
1267 | |||
1268 | fCancel = args.Cancel; | ||
1269 | return args.HResult; | ||
1270 | } | ||
1271 | |||
1272 | int IBootstrapperApplication.OnDetectUpdateBegin(string wzUpdateLocation, ref bool fCancel, ref bool fSkip) | ||
1273 | { | ||
1274 | DetectUpdateBeginEventArgs args = new DetectUpdateBeginEventArgs(wzUpdateLocation, fCancel, fSkip); | ||
1275 | this.OnDetectUpdateBegin(args); | ||
1276 | |||
1277 | fCancel = args.Cancel; | ||
1278 | fSkip = args.Skip; | ||
1279 | return args.HResult; | ||
1280 | } | ||
1281 | |||
1282 | int IBootstrapperApplication.OnDetectUpdate(string wzUpdateLocation, long dw64Size, string wzVersion, string wzTitle, string wzSummary, string wzContentType, string wzContent, ref bool fCancel, ref bool fStopProcessingUpdates) | ||
1283 | { | ||
1284 | DetectUpdateEventArgs args = new DetectUpdateEventArgs(wzUpdateLocation, dw64Size, wzVersion, wzTitle, wzSummary, wzContentType, wzContent, fCancel, fStopProcessingUpdates); | ||
1285 | this.OnDetectUpdate(args); | ||
1286 | |||
1287 | fCancel = args.Cancel; | ||
1288 | fStopProcessingUpdates = args.StopProcessingUpdates; | ||
1289 | return args.HResult; | ||
1290 | } | ||
1291 | |||
1292 | int IBootstrapperApplication.OnDetectUpdateComplete(int hrStatus, ref bool fIgnoreError) | ||
1293 | { | ||
1294 | DetectUpdateCompleteEventArgs args = new DetectUpdateCompleteEventArgs(hrStatus, fIgnoreError); | ||
1295 | this.OnDetectUpdateComplete(args); | ||
1296 | |||
1297 | fIgnoreError = args.IgnoreError; | ||
1298 | return args.HResult; | ||
1299 | } | ||
1300 | |||
1301 | int IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, RelatedOperation operation, bool fMissingFromCache, ref bool fCancel) | ||
1302 | { | ||
1303 | DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, wzVersion, operation, fMissingFromCache, fCancel); | ||
1304 | this.OnDetectRelatedBundle(args); | ||
1305 | |||
1306 | fCancel = args.Cancel; | ||
1307 | return args.HResult; | ||
1308 | } | ||
1309 | |||
1310 | int IBootstrapperApplication.OnDetectPackageBegin(string wzPackageId, ref bool fCancel) | ||
1311 | { | ||
1312 | DetectPackageBeginEventArgs args = new DetectPackageBeginEventArgs(wzPackageId, fCancel); | ||
1313 | this.OnDetectPackageBegin(args); | ||
1314 | |||
1315 | fCancel = args.Cancel; | ||
1316 | return args.HResult; | ||
1317 | } | ||
1318 | |||
1319 | int IBootstrapperApplication.OnDetectRelatedMsiPackage(string wzPackageId, string wzUpgradeCode, string wzProductCode, bool fPerMachine, string wzVersion, RelatedOperation operation, ref bool fCancel) | ||
1320 | { | ||
1321 | DetectRelatedMsiPackageEventArgs args = new DetectRelatedMsiPackageEventArgs(wzPackageId, wzUpgradeCode, wzProductCode, fPerMachine, wzVersion, operation, fCancel); | ||
1322 | this.OnDetectRelatedMsiPackage(args); | ||
1323 | |||
1324 | fCancel = args.Cancel; | ||
1325 | return args.HResult; | ||
1326 | } | ||
1327 | |||
1328 | int IBootstrapperApplication.OnDetectPatchTarget(string wzPackageId, string wzProductCode, PackageState patchState, ref bool fCancel) | ||
1329 | { | ||
1330 | DetectPatchTargetEventArgs args = new DetectPatchTargetEventArgs(wzPackageId, wzProductCode, patchState, fCancel); | ||
1331 | this.OnDetectPatchTarget(args); | ||
1332 | |||
1333 | fCancel = args.Cancel; | ||
1334 | return args.HResult; | ||
1335 | } | ||
1336 | |||
1337 | int IBootstrapperApplication.OnDetectMsiFeature(string wzPackageId, string wzFeatureId, FeatureState state, ref bool fCancel) | ||
1338 | { | ||
1339 | DetectMsiFeatureEventArgs args = new DetectMsiFeatureEventArgs(wzPackageId, wzFeatureId, state, fCancel); | ||
1340 | this.OnDetectMsiFeature(args); | ||
1341 | |||
1342 | fCancel = args.Cancel; | ||
1343 | return args.HResult; | ||
1344 | } | ||
1345 | |||
1346 | int IBootstrapperApplication.OnDetectPackageComplete(string wzPackageId, int hrStatus, PackageState state, bool fCached) | ||
1347 | { | ||
1348 | DetectPackageCompleteEventArgs args = new DetectPackageCompleteEventArgs(wzPackageId, hrStatus, state, fCached); | ||
1349 | this.OnDetectPackageComplete(args); | ||
1350 | |||
1351 | return args.HResult; | ||
1352 | } | ||
1353 | |||
1354 | int IBootstrapperApplication.OnDetectComplete(int hrStatus, bool fEligibleForCleanup) | ||
1355 | { | ||
1356 | DetectCompleteEventArgs args = new DetectCompleteEventArgs(hrStatus, fEligibleForCleanup); | ||
1357 | this.OnDetectComplete(args); | ||
1358 | |||
1359 | return args.HResult; | ||
1360 | } | ||
1361 | |||
1362 | int IBootstrapperApplication.OnPlanBegin(int cPackages, ref bool fCancel) | ||
1363 | { | ||
1364 | PlanBeginEventArgs args = new PlanBeginEventArgs(cPackages, fCancel); | ||
1365 | this.OnPlanBegin(args); | ||
1366 | |||
1367 | fCancel = args.Cancel; | ||
1368 | return args.HResult; | ||
1369 | } | ||
1370 | |||
1371 | int IBootstrapperApplication.OnPlanRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) | ||
1372 | { | ||
1373 | PlanRelatedBundleEventArgs args = new PlanRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); | ||
1374 | this.OnPlanRelatedBundle(args); | ||
1375 | |||
1376 | pRequestedState = args.State; | ||
1377 | fCancel = args.Cancel; | ||
1378 | return args.HResult; | ||
1379 | } | ||
1380 | |||
1381 | int IBootstrapperApplication.OnPlanPackageBegin(string wzPackageId, PackageState state, bool fCached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, ref RequestState pRequestedState, ref BOOTSTRAPPER_CACHE_TYPE pRequestedCacheType, ref bool fCancel) | ||
1382 | { | ||
1383 | PlanPackageBeginEventArgs args = new PlanPackageBeginEventArgs(wzPackageId, state, fCached, installCondition, recommendedState, recommendedCacheType, pRequestedState, pRequestedCacheType, fCancel); | ||
1384 | this.OnPlanPackageBegin(args); | ||
1385 | |||
1386 | pRequestedState = args.State; | ||
1387 | fCancel = args.Cancel; | ||
1388 | return args.HResult; | ||
1389 | } | ||
1390 | |||
1391 | int IBootstrapperApplication.OnPlanPatchTarget(string wzPackageId, string wzProductCode, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) | ||
1392 | { | ||
1393 | PlanPatchTargetEventArgs args = new PlanPatchTargetEventArgs(wzPackageId, wzProductCode, recommendedState, pRequestedState, fCancel); | ||
1394 | this.OnPlanPatchTarget(args); | ||
1395 | |||
1396 | pRequestedState = args.State; | ||
1397 | fCancel = args.Cancel; | ||
1398 | return args.HResult; | ||
1399 | } | ||
1400 | |||
1401 | int IBootstrapperApplication.OnPlanMsiFeature(string wzPackageId, string wzFeatureId, FeatureState recommendedState, ref FeatureState pRequestedState, ref bool fCancel) | ||
1402 | { | ||
1403 | PlanMsiFeatureEventArgs args = new PlanMsiFeatureEventArgs(wzPackageId, wzFeatureId, recommendedState, pRequestedState, fCancel); | ||
1404 | this.OnPlanMsiFeature(args); | ||
1405 | |||
1406 | pRequestedState = args.State; | ||
1407 | fCancel = args.Cancel; | ||
1408 | return args.HResult; | ||
1409 | } | ||
1410 | |||
1411 | int IBootstrapperApplication.OnPlanMsiPackage(string wzPackageId, bool fExecute, ActionState action, ref bool fCancel, ref BURN_MSI_PROPERTY actionMsiProperty, ref INSTALLUILEVEL uiLevel, ref bool fDisableExternalUiHandler) | ||
1412 | { | ||
1413 | PlanMsiPackageEventArgs args = new PlanMsiPackageEventArgs(wzPackageId, fExecute, action, fCancel, actionMsiProperty, uiLevel, fDisableExternalUiHandler); | ||
1414 | this.OnPlanMsiPackage(args); | ||
1415 | |||
1416 | fCancel = args.Cancel; | ||
1417 | actionMsiProperty = args.ActionMsiProperty; | ||
1418 | uiLevel = args.UiLevel; | ||
1419 | fDisableExternalUiHandler = args.DisableExternalUiHandler; | ||
1420 | return args.HResult; | ||
1421 | } | ||
1422 | |||
1423 | int IBootstrapperApplication.OnPlanPackageComplete(string wzPackageId, int hrStatus, RequestState requested) | ||
1424 | { | ||
1425 | var args = new PlanPackageCompleteEventArgs(wzPackageId, hrStatus, requested); | ||
1426 | this.OnPlanPackageComplete(args); | ||
1427 | |||
1428 | return args.HResult; | ||
1429 | } | ||
1430 | |||
1431 | int IBootstrapperApplication.OnPlannedPackage(string wzPackageId, ActionState execute, ActionState rollback, bool fPlannedCache, bool fPlannedUncache) | ||
1432 | { | ||
1433 | var args = new PlannedPackageEventArgs(wzPackageId, execute, rollback, fPlannedCache, fPlannedUncache); | ||
1434 | this.OnPlannedPackage(args); | ||
1435 | |||
1436 | return args.HResult; | ||
1437 | } | ||
1438 | |||
1439 | int IBootstrapperApplication.OnPlanComplete(int hrStatus) | ||
1440 | { | ||
1441 | PlanCompleteEventArgs args = new PlanCompleteEventArgs(hrStatus); | ||
1442 | this.OnPlanComplete(args); | ||
1443 | |||
1444 | return args.HResult; | ||
1445 | } | ||
1446 | |||
1447 | int IBootstrapperApplication.OnApplyBegin(int dwPhaseCount, ref bool fCancel) | ||
1448 | { | ||
1449 | this.applying = true; | ||
1450 | |||
1451 | ApplyBeginEventArgs args = new ApplyBeginEventArgs(dwPhaseCount, fCancel); | ||
1452 | this.OnApplyBegin(args); | ||
1453 | |||
1454 | fCancel = args.Cancel; | ||
1455 | return args.HResult; | ||
1456 | } | ||
1457 | |||
1458 | int IBootstrapperApplication.OnElevateBegin(ref bool fCancel) | ||
1459 | { | ||
1460 | ElevateBeginEventArgs args = new ElevateBeginEventArgs(fCancel); | ||
1461 | this.OnElevateBegin(args); | ||
1462 | |||
1463 | fCancel = args.Cancel; | ||
1464 | return args.HResult; | ||
1465 | } | ||
1466 | |||
1467 | int IBootstrapperApplication.OnElevateComplete(int hrStatus) | ||
1468 | { | ||
1469 | ElevateCompleteEventArgs args = new ElevateCompleteEventArgs(hrStatus); | ||
1470 | this.OnElevateComplete(args); | ||
1471 | |||
1472 | return args.HResult; | ||
1473 | } | ||
1474 | |||
1475 | int IBootstrapperApplication.OnProgress(int dwProgressPercentage, int dwOverallPercentage, ref bool fCancel) | ||
1476 | { | ||
1477 | ProgressEventArgs args = new ProgressEventArgs(dwProgressPercentage, dwOverallPercentage, fCancel); | ||
1478 | this.OnProgress(args); | ||
1479 | |||
1480 | fCancel = args.Cancel; | ||
1481 | return args.HResult; | ||
1482 | } | ||
1483 | |||
1484 | int IBootstrapperApplication.OnError(ErrorType errorType, string wzPackageId, int dwCode, string wzError, int dwUIHint, int cData, string[] rgwzData, Result nRecommendation, ref Result pResult) | ||
1485 | { | ||
1486 | ErrorEventArgs args = new ErrorEventArgs(errorType, wzPackageId, dwCode, wzError, dwUIHint, rgwzData, nRecommendation, pResult); | ||
1487 | this.OnError(args); | ||
1488 | |||
1489 | pResult = args.Result; | ||
1490 | return args.HResult; | ||
1491 | } | ||
1492 | |||
1493 | int IBootstrapperApplication.OnRegisterBegin(ref bool fCancel) | ||
1494 | { | ||
1495 | RegisterBeginEventArgs args = new RegisterBeginEventArgs(fCancel); | ||
1496 | this.OnRegisterBegin(args); | ||
1497 | |||
1498 | fCancel = args.Cancel; | ||
1499 | return args.HResult; | ||
1500 | } | ||
1501 | |||
1502 | int IBootstrapperApplication.OnRegisterComplete(int hrStatus) | ||
1503 | { | ||
1504 | RegisterCompleteEventArgs args = new RegisterCompleteEventArgs(hrStatus); | ||
1505 | this.OnRegisterComplete(args); | ||
1506 | |||
1507 | return args.HResult; | ||
1508 | } | ||
1509 | |||
1510 | int IBootstrapperApplication.OnCacheBegin(ref bool fCancel) | ||
1511 | { | ||
1512 | CacheBeginEventArgs args = new CacheBeginEventArgs(fCancel); | ||
1513 | this.OnCacheBegin(args); | ||
1514 | |||
1515 | fCancel = args.Cancel; | ||
1516 | return args.HResult; | ||
1517 | } | ||
1518 | |||
1519 | int IBootstrapperApplication.OnCachePackageBegin(string wzPackageId, int cCachePayloads, long dw64PackageCacheSize, ref bool fCancel) | ||
1520 | { | ||
1521 | CachePackageBeginEventArgs args = new CachePackageBeginEventArgs(wzPackageId, cCachePayloads, dw64PackageCacheSize, fCancel); | ||
1522 | this.OnCachePackageBegin(args); | ||
1523 | |||
1524 | fCancel = args.Cancel; | ||
1525 | return args.HResult; | ||
1526 | } | ||
1527 | |||
1528 | int IBootstrapperApplication.OnCacheAcquireBegin(string wzPackageOrContainerId, string wzPayloadId, string wzSource, string wzDownloadUrl, string wzPayloadContainerId, CacheOperation recommendation, ref CacheOperation action, ref bool fCancel) | ||
1529 | { | ||
1530 | CacheAcquireBeginEventArgs args = new CacheAcquireBeginEventArgs(wzPackageOrContainerId, wzPayloadId, wzSource, wzDownloadUrl, wzPayloadContainerId, recommendation, action, fCancel); | ||
1531 | this.OnCacheAcquireBegin(args); | ||
1532 | |||
1533 | action = args.Action; | ||
1534 | fCancel = args.Cancel; | ||
1535 | return args.HResult; | ||
1536 | } | ||
1537 | |||
1538 | int IBootstrapperApplication.OnCacheAcquireProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) | ||
1539 | { | ||
1540 | CacheAcquireProgressEventArgs args = new CacheAcquireProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); | ||
1541 | this.OnCacheAcquireProgress(args); | ||
1542 | |||
1543 | fCancel = args.Cancel; | ||
1544 | return args.HResult; | ||
1545 | } | ||
1546 | |||
1547 | int IBootstrapperApplication.OnCacheAcquireResolving(string wzPackageOrContainerId, string wzPayloadId, string[] searchPaths, int cSearchPaths, bool fFoundLocal, int dwRecommendedSearchPath, string wzDownloadUrl, string wzPayloadContainerId, CacheResolveOperation recommendation, ref int dwChosenSearchPath, ref CacheResolveOperation action, ref bool fCancel) | ||
1548 | { | ||
1549 | CacheAcquireResolvingEventArgs args = new CacheAcquireResolvingEventArgs(wzPackageOrContainerId, wzPayloadId, searchPaths, fFoundLocal, dwRecommendedSearchPath, wzDownloadUrl, wzPayloadContainerId, recommendation, dwChosenSearchPath, action, fCancel); | ||
1550 | this.OnCacheAcquireResolving(args); | ||
1551 | |||
1552 | dwChosenSearchPath = args.ChosenSearchPath; | ||
1553 | action = args.Action; | ||
1554 | fCancel = args.Cancel; | ||
1555 | return args.HResult; | ||
1556 | } | ||
1557 | |||
1558 | int IBootstrapperApplication.OnCacheAcquireComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) | ||
1559 | { | ||
1560 | CacheAcquireCompleteEventArgs args = new CacheAcquireCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action); | ||
1561 | this.OnCacheAcquireComplete(args); | ||
1562 | |||
1563 | action = args.Action; | ||
1564 | return args.HResult; | ||
1565 | } | ||
1566 | |||
1567 | int IBootstrapperApplication.OnCacheVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) | ||
1568 | { | ||
1569 | CacheVerifyBeginEventArgs args = new CacheVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); | ||
1570 | this.OnCacheVerifyBegin(args); | ||
1571 | |||
1572 | fCancel = args.Cancel; | ||
1573 | return args.HResult; | ||
1574 | } | ||
1575 | |||
1576 | int IBootstrapperApplication.OnCacheVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, CacheVerifyStep verifyStep, ref bool fCancel) | ||
1577 | { | ||
1578 | CacheVerifyProgressEventArgs args = new CacheVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, verifyStep, fCancel); | ||
1579 | this.OnCacheVerifyProgress(args); | ||
1580 | |||
1581 | fCancel = args.Cancel; | ||
1582 | return args.HResult; | ||
1583 | } | ||
1584 | |||
1585 | int IBootstrapperApplication.OnCacheVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) | ||
1586 | { | ||
1587 | CacheVerifyCompleteEventArgs args = new CacheVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action); | ||
1588 | this.OnCacheVerifyComplete(args); | ||
1589 | |||
1590 | action = args.Action; | ||
1591 | return args.HResult; | ||
1592 | } | ||
1593 | |||
1594 | int IBootstrapperApplication.OnCachePackageComplete(string wzPackageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) | ||
1595 | { | ||
1596 | CachePackageCompleteEventArgs args = new CachePackageCompleteEventArgs(wzPackageId, hrStatus, recommendation, action); | ||
1597 | this.OnCachePackageComplete(args); | ||
1598 | |||
1599 | action = args.Action; | ||
1600 | return args.HResult; | ||
1601 | } | ||
1602 | |||
1603 | int IBootstrapperApplication.OnCacheComplete(int hrStatus) | ||
1604 | { | ||
1605 | CacheCompleteEventArgs args = new CacheCompleteEventArgs(hrStatus); | ||
1606 | this.OnCacheComplete(args); | ||
1607 | |||
1608 | return args.HResult; | ||
1609 | } | ||
1610 | |||
1611 | int IBootstrapperApplication.OnExecuteBegin(int cExecutingPackages, ref bool fCancel) | ||
1612 | { | ||
1613 | ExecuteBeginEventArgs args = new ExecuteBeginEventArgs(cExecutingPackages, fCancel); | ||
1614 | this.OnExecuteBegin(args); | ||
1615 | |||
1616 | args.Cancel = fCancel; | ||
1617 | return args.HResult; | ||
1618 | } | ||
1619 | |||
1620 | int IBootstrapperApplication.OnExecutePackageBegin(string wzPackageId, bool fExecute, ActionState action, INSTALLUILEVEL uiLevel, bool fDisableExternalUiHandler, ref bool fCancel) | ||
1621 | { | ||
1622 | ExecutePackageBeginEventArgs args = new ExecutePackageBeginEventArgs(wzPackageId, fExecute, action, uiLevel, fDisableExternalUiHandler, fCancel); | ||
1623 | this.OnExecutePackageBegin(args); | ||
1624 | |||
1625 | fCancel = args.Cancel; | ||
1626 | return args.HResult; | ||
1627 | } | ||
1628 | |||
1629 | int IBootstrapperApplication.OnExecutePatchTarget(string wzPackageId, string wzTargetProductCode, ref bool fCancel) | ||
1630 | { | ||
1631 | ExecutePatchTargetEventArgs args = new ExecutePatchTargetEventArgs(wzPackageId, wzTargetProductCode, fCancel); | ||
1632 | this.OnExecutePatchTarget(args); | ||
1633 | |||
1634 | fCancel = args.Cancel; | ||
1635 | return args.HResult; | ||
1636 | } | ||
1637 | |||
1638 | int IBootstrapperApplication.OnExecuteProgress(string wzPackageId, int dwProgressPercentage, int dwOverallPercentage, ref bool fCancel) | ||
1639 | { | ||
1640 | ExecuteProgressEventArgs args = new ExecuteProgressEventArgs(wzPackageId, dwProgressPercentage, dwOverallPercentage, fCancel); | ||
1641 | this.OnExecuteProgress(args); | ||
1642 | |||
1643 | fCancel = args.Cancel; | ||
1644 | return args.HResult; | ||
1645 | } | ||
1646 | |||
1647 | int IBootstrapperApplication.OnExecuteMsiMessage(string wzPackageId, InstallMessage messageType, int dwUIHint, string wzMessage, int cData, string[] rgwzData, Result nRecommendation, ref Result pResult) | ||
1648 | { | ||
1649 | ExecuteMsiMessageEventArgs args = new ExecuteMsiMessageEventArgs(wzPackageId, messageType, dwUIHint, wzMessage, rgwzData, nRecommendation, pResult); | ||
1650 | this.OnExecuteMsiMessage(args); | ||
1651 | |||
1652 | pResult = args.Result; | ||
1653 | return args.HResult; | ||
1654 | } | ||
1655 | |||
1656 | int IBootstrapperApplication.OnExecuteFilesInUse(string wzPackageId, int cFiles, string[] rgwzFiles, Result nRecommendation, ref Result pResult) | ||
1657 | { | ||
1658 | ExecuteFilesInUseEventArgs args = new ExecuteFilesInUseEventArgs(wzPackageId, rgwzFiles, nRecommendation, pResult); | ||
1659 | this.OnExecuteFilesInUse(args); | ||
1660 | |||
1661 | pResult = args.Result; | ||
1662 | return args.HResult; | ||
1663 | } | ||
1664 | |||
1665 | int IBootstrapperApplication.OnExecutePackageComplete(string wzPackageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION pAction) | ||
1666 | { | ||
1667 | ExecutePackageCompleteEventArgs args = new ExecutePackageCompleteEventArgs(wzPackageId, hrStatus, restart, recommendation, pAction); | ||
1668 | this.OnExecutePackageComplete(args); | ||
1669 | |||
1670 | pAction = args.Action; | ||
1671 | return args.HResult; | ||
1672 | } | ||
1673 | |||
1674 | int IBootstrapperApplication.OnExecuteComplete(int hrStatus) | ||
1675 | { | ||
1676 | ExecuteCompleteEventArgs args = new ExecuteCompleteEventArgs(hrStatus); | ||
1677 | this.OnExecuteComplete(args); | ||
1678 | |||
1679 | return args.HResult; | ||
1680 | } | ||
1681 | |||
1682 | int IBootstrapperApplication.OnUnregisterBegin(bool fKeepRegistration, ref bool fForceKeepRegistration) | ||
1683 | { | ||
1684 | UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(fKeepRegistration, fForceKeepRegistration); | ||
1685 | this.OnUnregisterBegin(args); | ||
1686 | |||
1687 | fForceKeepRegistration = args.ForceKeepRegistration; | ||
1688 | return args.HResult; | ||
1689 | } | ||
1690 | |||
1691 | int IBootstrapperApplication.OnUnregisterComplete(int hrStatus) | ||
1692 | { | ||
1693 | UnregisterCompleteEventArgs args = new UnregisterCompleteEventArgs(hrStatus); | ||
1694 | this.OnUnregisterComplete(args); | ||
1695 | |||
1696 | return args.HResult; | ||
1697 | } | ||
1698 | |||
1699 | int IBootstrapperApplication.OnApplyComplete(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_APPLYCOMPLETE_ACTION pAction) | ||
1700 | { | ||
1701 | ApplyCompleteEventArgs args = new ApplyCompleteEventArgs(hrStatus, restart, recommendation, pAction); | ||
1702 | this.OnApplyComplete(args); | ||
1703 | |||
1704 | this.applying = false; | ||
1705 | |||
1706 | pAction = args.Action; | ||
1707 | return args.HResult; | ||
1708 | } | ||
1709 | |||
1710 | int IBootstrapperApplication.OnLaunchApprovedExeBegin(ref bool fCancel) | ||
1711 | { | ||
1712 | LaunchApprovedExeBeginEventArgs args = new LaunchApprovedExeBeginEventArgs(fCancel); | ||
1713 | this.OnLaunchApprovedExeBegin(args); | ||
1714 | |||
1715 | fCancel = args.Cancel; | ||
1716 | return args.HResult; | ||
1717 | } | ||
1718 | |||
1719 | int IBootstrapperApplication.OnLaunchApprovedExeComplete(int hrStatus, int processId) | ||
1720 | { | ||
1721 | LaunchApprovedExeCompleteEventArgs args = new LaunchApprovedExeCompleteEventArgs(hrStatus, processId); | ||
1722 | this.OnLaunchApprovedExeComplete(args); | ||
1723 | |||
1724 | return args.HResult; | ||
1725 | } | ||
1726 | |||
1727 | int IBootstrapperApplication.OnBeginMsiTransactionBegin(string transactionId, ref bool fCancel) | ||
1728 | { | ||
1729 | BeginMsiTransactionBeginEventArgs args = new BeginMsiTransactionBeginEventArgs(transactionId, fCancel); | ||
1730 | this.OnBeginMsiTransactionBegin(args); | ||
1731 | |||
1732 | fCancel = args.Cancel; | ||
1733 | return args.HResult; | ||
1734 | } | ||
1735 | |||
1736 | int IBootstrapperApplication.OnBeginMsiTransactionComplete(string transactionId, int hrStatus) | ||
1737 | { | ||
1738 | BeginMsiTransactionCompleteEventArgs args = new BeginMsiTransactionCompleteEventArgs(transactionId, hrStatus); | ||
1739 | this.OnBeginMsiTransactionComplete(args); | ||
1740 | |||
1741 | return args.HResult; | ||
1742 | } | ||
1743 | |||
1744 | int IBootstrapperApplication.OnCommitMsiTransactionBegin(string transactionId, ref bool fCancel) | ||
1745 | { | ||
1746 | CommitMsiTransactionBeginEventArgs args = new CommitMsiTransactionBeginEventArgs(transactionId, fCancel); | ||
1747 | this.OnCommitMsiTransactionBegin(args); | ||
1748 | |||
1749 | fCancel = args.Cancel; | ||
1750 | return args.HResult; | ||
1751 | } | ||
1752 | |||
1753 | int IBootstrapperApplication.OnCommitMsiTransactionComplete(string transactionId, int hrStatus) | ||
1754 | { | ||
1755 | CommitMsiTransactionCompleteEventArgs args = new CommitMsiTransactionCompleteEventArgs(transactionId, hrStatus); | ||
1756 | this.OnCommitMsiTransactionComplete(args); | ||
1757 | |||
1758 | return args.HResult; | ||
1759 | } | ||
1760 | |||
1761 | int IBootstrapperApplication.OnRollbackMsiTransactionBegin(string transactionId) | ||
1762 | { | ||
1763 | RollbackMsiTransactionBeginEventArgs args = new RollbackMsiTransactionBeginEventArgs(transactionId); | ||
1764 | this.OnRollbackMsiTransactionBegin(args); | ||
1765 | |||
1766 | return args.HResult; | ||
1767 | } | ||
1768 | |||
1769 | int IBootstrapperApplication.OnRollbackMsiTransactionComplete(string transactionId, int hrStatus) | ||
1770 | { | ||
1771 | RollbackMsiTransactionCompleteEventArgs args = new RollbackMsiTransactionCompleteEventArgs(transactionId, hrStatus); | ||
1772 | this.OnRollbackMsiTransactionComplete(args); | ||
1773 | |||
1774 | return args.HResult; | ||
1775 | } | ||
1776 | |||
1777 | int IBootstrapperApplication.OnPauseAutomaticUpdatesBegin() | ||
1778 | { | ||
1779 | PauseAutomaticUpdatesBeginEventArgs args = new PauseAutomaticUpdatesBeginEventArgs(); | ||
1780 | this.OnPauseAutomaticUpdatesBegin(args); | ||
1781 | |||
1782 | return args.HResult; | ||
1783 | } | ||
1784 | |||
1785 | int IBootstrapperApplication.OnPauseAutomaticUpdatesComplete(int hrStatus) | ||
1786 | { | ||
1787 | PauseAutomaticUpdatesCompleteEventArgs args = new PauseAutomaticUpdatesCompleteEventArgs(hrStatus); | ||
1788 | this.OnPauseAutomaticUpdatesComplete(args); | ||
1789 | |||
1790 | return args.HResult; | ||
1791 | } | ||
1792 | |||
1793 | int IBootstrapperApplication.OnSystemRestorePointBegin() | ||
1794 | { | ||
1795 | SystemRestorePointBeginEventArgs args = new SystemRestorePointBeginEventArgs(); | ||
1796 | this.OnSystemRestorePointBegin(args); | ||
1797 | |||
1798 | return args.HResult; | ||
1799 | } | ||
1800 | |||
1801 | int IBootstrapperApplication.OnSystemRestorePointComplete(int hrStatus) | ||
1802 | { | ||
1803 | SystemRestorePointCompleteEventArgs args = new SystemRestorePointCompleteEventArgs(hrStatus); | ||
1804 | this.OnSystemRestorePointComplete(args); | ||
1805 | |||
1806 | return args.HResult; | ||
1807 | } | ||
1808 | |||
1809 | int IBootstrapperApplication.OnPlanForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fRecommendedIgnoreBundle, ref bool fCancel, ref bool fIgnoreBundle) | ||
1810 | { | ||
1811 | PlanForwardCompatibleBundleEventArgs args = new PlanForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fRecommendedIgnoreBundle, fCancel, fIgnoreBundle); | ||
1812 | this.OnPlanForwardCompatibleBundle(args); | ||
1813 | |||
1814 | fCancel = args.Cancel; | ||
1815 | fIgnoreBundle = args.IgnoreBundle; | ||
1816 | return args.HResult; | ||
1817 | } | ||
1818 | |||
1819 | int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) | ||
1820 | { | ||
1821 | CacheContainerOrPayloadVerifyBeginEventArgs args = new CacheContainerOrPayloadVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); | ||
1822 | this.OnCacheContainerOrPayloadVerifyBegin(args); | ||
1823 | |||
1824 | fCancel = args.Cancel; | ||
1825 | return args.HResult; | ||
1826 | } | ||
1827 | |||
1828 | int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) | ||
1829 | { | ||
1830 | CacheContainerOrPayloadVerifyProgressEventArgs args = new CacheContainerOrPayloadVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); | ||
1831 | this.OnCacheContainerOrPayloadVerifyProgress(args); | ||
1832 | |||
1833 | fCancel = args.Cancel; | ||
1834 | return args.HResult; | ||
1835 | } | ||
1836 | |||
1837 | int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus) | ||
1838 | { | ||
1839 | CacheContainerOrPayloadVerifyCompleteEventArgs args = new CacheContainerOrPayloadVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus); | ||
1840 | this.OnCacheContainerOrPayloadVerifyComplete(args); | ||
1841 | |||
1842 | return args.HResult; | ||
1843 | } | ||
1844 | |||
1845 | int IBootstrapperApplication.OnCachePayloadExtractBegin(string wzContainerId, string wzPayloadId, ref bool fCancel) | ||
1846 | { | ||
1847 | CachePayloadExtractBeginEventArgs args = new CachePayloadExtractBeginEventArgs(wzContainerId, wzPayloadId, fCancel); | ||
1848 | this.OnCachePayloadExtractBegin(args); | ||
1849 | |||
1850 | fCancel = args.Cancel; | ||
1851 | return args.HResult; | ||
1852 | } | ||
1853 | |||
1854 | int IBootstrapperApplication.OnCachePayloadExtractProgress(string wzContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) | ||
1855 | { | ||
1856 | CachePayloadExtractProgressEventArgs args = new CachePayloadExtractProgressEventArgs(wzContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); | ||
1857 | this.OnCachePayloadExtractProgress(args); | ||
1858 | |||
1859 | fCancel = args.Cancel; | ||
1860 | return args.HResult; | ||
1861 | } | ||
1862 | |||
1863 | int IBootstrapperApplication.OnCachePayloadExtractComplete(string wzContainerId, string wzPayloadId, int hrStatus) | ||
1864 | { | ||
1865 | CachePayloadExtractCompleteEventArgs args = new CachePayloadExtractCompleteEventArgs(wzContainerId, wzPayloadId, hrStatus); | ||
1866 | this.OnCachePayloadExtractComplete(args); | ||
1867 | |||
1868 | return args.HResult; | ||
1869 | } | ||
1870 | |||
1871 | #endregion | ||
1872 | } | ||
1873 | } | ||