diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-03-02 15:11:58 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-03-02 16:28:29 -0600 |
| commit | 5f4829e678c9c5cd5e581b0075cfa4a6b263c66e (patch) | |
| tree | 444b4996e2213d825910d53de1a520c4ef57b2a1 /src/WixToolset.Mba.Core | |
| parent | 022beff26b46c7808eefacfebccfc1fcb5aa5256 (diff) | |
| download | wix-5f4829e678c9c5cd5e581b0075cfa4a6b263c66e.tar.gz wix-5f4829e678c9c5cd5e581b0075cfa4a6b263c66e.tar.bz2 wix-5f4829e678c9c5cd5e581b0075cfa4a6b263c66e.zip | |
Integrate OnUnregisterBegin changes in Burn headers.
Diffstat (limited to 'src/WixToolset.Mba.Core')
4 files changed, 28 insertions, 16 deletions
diff --git a/src/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/WixToolset.Mba.Core/BootstrapperApplication.cs index 43e69e81..1812c80b 100644 --- a/src/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
| @@ -1529,12 +1529,12 @@ namespace WixToolset.Mba.Core | |||
| 1529 | return args.HResult; | 1529 | return args.HResult; |
| 1530 | } | 1530 | } |
| 1531 | 1531 | ||
| 1532 | int IBootstrapperApplication.OnUnregisterBegin(ref bool fCancel) | 1532 | int IBootstrapperApplication.OnUnregisterBegin(bool fKeepRegistration, ref bool fForceKeepRegistration) |
| 1533 | { | 1533 | { |
| 1534 | UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(fCancel); | 1534 | UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(fKeepRegistration, fForceKeepRegistration); |
| 1535 | this.OnUnregisterBegin(args); | 1535 | this.OnUnregisterBegin(args); |
| 1536 | 1536 | ||
| 1537 | fCancel = args.Cancel; | 1537 | fForceKeepRegistration = args.ForceKeepRegistration; |
| 1538 | return args.HResult; | 1538 | return args.HResult; |
| 1539 | } | 1539 | } |
| 1540 | 1540 | ||
diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs index 953e31ee..56705769 100644 --- a/src/WixToolset.Mba.Core/EventArgs.cs +++ b/src/WixToolset.Mba.Core/EventArgs.cs | |||
| @@ -1187,31 +1187,41 @@ namespace WixToolset.Mba.Core | |||
| 1187 | } | 1187 | } |
| 1188 | 1188 | ||
| 1189 | /// <summary> | 1189 | /// <summary> |
| 1190 | /// Additional arguments used when the engine has begun removing the registration for the location and visibility of the bundle. | 1190 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.UnregisterBegin"/> |
| 1191 | /// </summary> | 1191 | /// </summary> |
| 1192 | [Serializable] | 1192 | [Serializable] |
| 1193 | public class UnregisterBeginEventArgs : CancellableHResultEventArgs | 1193 | public class UnregisterBeginEventArgs : HResultEventArgs |
| 1194 | { | 1194 | { |
| 1195 | /// <summary> | 1195 | /// <summary> |
| 1196 | /// Creates a new instance of the <see cref="UnregisterBeginEventArgs"/> class. | 1196 | /// |
| 1197 | /// </summary> | 1197 | /// </summary> |
| 1198 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | 1198 | /// <param name="keepRegistration"></param> |
| 1199 | public UnregisterBeginEventArgs(bool cancelRecommendation) | 1199 | /// <param name="forceKeepRegistration"></param> |
| 1200 | : base(cancelRecommendation) | 1200 | public UnregisterBeginEventArgs(bool keepRegistration, bool forceKeepRegistration) |
| 1201 | { | 1201 | { |
| 1202 | } | 1202 | } |
| 1203 | |||
| 1204 | /// <summary> | ||
| 1205 | /// Indicates whether the engine will uninstall the bundle. | ||
| 1206 | /// </summary> | ||
| 1207 | public bool ForceKeepRegistration { get; set; } | ||
| 1208 | |||
| 1209 | /// <summary> | ||
| 1210 | /// If <see cref="KeepRegistration"/> is FALSE, then this can be set to TRUE to make the engine keep the bundle installed. | ||
| 1211 | /// </summary> | ||
| 1212 | public bool KeepRegistration { get; private set; } | ||
| 1203 | } | 1213 | } |
| 1204 | 1214 | ||
| 1205 | /// <summary> | 1215 | /// <summary> |
| 1206 | /// Additional arguments used when the engine has completed removing the registration for the location and visibility of the bundle. | 1216 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.UnregisterComplete"/> |
| 1207 | /// </summary> | 1217 | /// </summary> |
| 1208 | [Serializable] | 1218 | [Serializable] |
| 1209 | public class UnregisterCompleteEventArgs : StatusEventArgs | 1219 | public class UnregisterCompleteEventArgs : StatusEventArgs |
| 1210 | { | 1220 | { |
| 1211 | /// <summary> | 1221 | /// <summary> |
| 1212 | /// Creates a new instance of the <see cref="UnregisterCompleteEventArgs"/> class. | 1222 | /// |
| 1213 | /// </summary> | 1223 | /// </summary> |
| 1214 | /// <param name="hrStatus">The return code of the operation.</param> | 1224 | /// <param name="hrStatus"></param> |
| 1215 | public UnregisterCompleteEventArgs(int hrStatus) | 1225 | public UnregisterCompleteEventArgs(int hrStatus) |
| 1216 | : base(hrStatus) | 1226 | : base(hrStatus) |
| 1217 | { | 1227 | { |
diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs index 7ff243d2..4812c038 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
| @@ -822,12 +822,14 @@ namespace WixToolset.Mba.Core | |||
| 822 | /// <summary> | 822 | /// <summary> |
| 823 | /// See <see cref="IDefaultBootstrapperApplication.UnregisterBegin"/>. | 823 | /// See <see cref="IDefaultBootstrapperApplication.UnregisterBegin"/>. |
| 824 | /// </summary> | 824 | /// </summary> |
| 825 | /// <param name="fCancel"></param> | 825 | /// <param name="fKeepRegistration"></param> |
| 826 | /// <param name="fForceKeepRegistration"></param> | ||
| 826 | /// <returns></returns> | 827 | /// <returns></returns> |
| 827 | [PreserveSig] | 828 | [PreserveSig] |
| 828 | [return: MarshalAs(UnmanagedType.I4)] | 829 | [return: MarshalAs(UnmanagedType.I4)] |
| 829 | int OnUnregisterBegin( | 830 | int OnUnregisterBegin( |
| 830 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | 831 | [MarshalAs(UnmanagedType.Bool)] bool fKeepRegistration, |
| 832 | [MarshalAs(UnmanagedType.Bool)] ref bool fForceKeepRegistration | ||
| 831 | ); | 833 | ); |
| 832 | 834 | ||
| 833 | /// <summary> | 835 | /// <summary> |
diff --git a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index d0518049..5803a26a 100644 --- a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | |||
| @@ -332,12 +332,12 @@ namespace WixToolset.Mba.Core | |||
| 332 | event EventHandler<SystemShutdownEventArgs> SystemShutdown; | 332 | event EventHandler<SystemShutdownEventArgs> SystemShutdown; |
| 333 | 333 | ||
| 334 | /// <summary> | 334 | /// <summary> |
| 335 | /// Fired when the engine has begun removing the registration for the location and visibility of the bundle. | 335 | /// Fired when the engine unregisters the bundle. |
| 336 | /// </summary> | 336 | /// </summary> |
| 337 | event EventHandler<UnregisterBeginEventArgs> UnregisterBegin; | 337 | event EventHandler<UnregisterBeginEventArgs> UnregisterBegin; |
| 338 | 338 | ||
| 339 | /// <summary> | 339 | /// <summary> |
| 340 | /// Fired when the engine has completed removing the registration for the location and visibility of the bundle. | 340 | /// Fired when the engine unregistration is complete. |
| 341 | /// </summary> | 341 | /// </summary> |
| 342 | event EventHandler<UnregisterCompleteEventArgs> UnregisterComplete; | 342 | event EventHandler<UnregisterCompleteEventArgs> UnregisterComplete; |
| 343 | } | 343 | } |
