From 4cd1c4e06145434ca940ac828772dc47b9d9738e Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 13 Mar 2022 23:45:32 -0500 Subject: Allow the BA to override the bundle relation type during plan. --- .../WixToolset.Mba.Core/BootstrapperApplication.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs') diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index 1df992be..fd36cf26 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs @@ -88,6 +88,9 @@ namespace WixToolset.Mba.Core /// public event EventHandler PlanRelatedBundle; + /// + public event EventHandler PlanRelatedBundleType; + /// public event EventHandler PlanRollbackBoundary; @@ -533,6 +536,19 @@ namespace WixToolset.Mba.Core } } + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanRelatedBundleType(PlanRelatedBundleTypeEventArgs args) + { + EventHandler handler = this.PlanRelatedBundleType; + if (null != handler) + { + handler(this, args); + } + } + /// /// Called by the engine, raises the event. /// @@ -1514,6 +1530,16 @@ namespace WixToolset.Mba.Core return args.HResult; } + int IBootstrapperApplication.OnPlanRelatedBundleType(string wzBundleId, RelatedBundlePlanType recommendedType, ref RelatedBundlePlanType pRequestedType, ref bool fCancel) + { + PlanRelatedBundleTypeEventArgs args = new PlanRelatedBundleTypeEventArgs(wzBundleId, recommendedType, pRequestedType, fCancel); + this.OnPlanRelatedBundleType(args); + + pRequestedType = args.Type; + fCancel = args.Cancel; + return args.HResult; + } + int IBootstrapperApplication.OnPlanRollbackBoundary(string wzRollbackBoundaryId, bool fRecommendedTransaction, ref bool fTransaction, ref bool fCancel) { PlanRollbackBoundaryEventArgs args = new PlanRollbackBoundaryEventArgs(wzRollbackBoundaryId, fRecommendedTransaction, fTransaction, fCancel); -- cgit v1.2.3-55-g6feb