aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Mba.Core/EventArgs.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/WixToolset.Mba.Core/EventArgs.cs126
1 files changed, 77 insertions, 49 deletions
diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs
index 2f21b50e..953e31ee 100644
--- a/src/WixToolset.Mba.Core/EventArgs.cs
+++ b/src/WixToolset.Mba.Core/EventArgs.cs
@@ -547,18 +547,18 @@ namespace WixToolset.Mba.Core
547 } 547 }
548 548
549 /// <summary> 549 /// <summary>
550 /// Additional arguments used when a target MSI package has been detected. 550 /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectPatchTarget"/>
551 /// </summary> 551 /// </summary>
552 public class DetectTargetMsiPackageEventArgs : CancellableHResultEventArgs 552 public class DetectPatchTargetEventArgs : CancellableHResultEventArgs
553 { 553 {
554 /// <summary> 554 /// <summary>
555 /// Creates a new instance of the <see cref="DetectMsiFeatureEventArgs"/> class. 555 ///
556 /// </summary> 556 /// </summary>
557 /// <param name="packageId">Detected package identifier.</param> 557 /// <param name="packageId"></param>
558 /// <param name="productCode">Detected product code.</param> 558 /// <param name="productCode"></param>
559 /// <param name="state">Package state detected.</param> 559 /// <param name="state"></param>
560 /// <param name="cancelRecommendation">The recommendation from the engine.</param> 560 /// <param name="cancelRecommendation"></param>
561 public DetectTargetMsiPackageEventArgs(string packageId, string productCode, PackageState state, bool cancelRecommendation) 561 public DetectPatchTargetEventArgs(string packageId, string productCode, PackageState state, bool cancelRecommendation)
562 : base(cancelRecommendation) 562 : base(cancelRecommendation)
563 { 563 {
564 this.PackageId = packageId; 564 this.PackageId = packageId;
@@ -567,17 +567,17 @@ namespace WixToolset.Mba.Core
567 } 567 }
568 568
569 /// <summary> 569 /// <summary>
570 /// Gets the identity of the target's package detected. 570 /// Gets the identity of the patch's package.
571 /// </summary> 571 /// </summary>
572 public string PackageId { get; private set; } 572 public string PackageId { get; private set; }
573 573
574 /// <summary> 574 /// <summary>
575 /// Gets the product code of the target MSI detected. 575 /// Gets the product code of the target.
576 /// </summary> 576 /// </summary>
577 public string ProductCode { get; private set; } 577 public string ProductCode { get; private set; }
578 578
579 /// <summary> 579 /// <summary>
580 /// Gets the detected patch package state. 580 /// Gets the detected patch state for the target.
581 /// </summary> 581 /// </summary>
582 public PackageState State { get; private set; } 582 public PackageState State { get; private set; }
583 } 583 }
@@ -732,22 +732,26 @@ namespace WixToolset.Mba.Core
732 } 732 }
733 733
734 /// <summary> 734 /// <summary>
735 /// Additional arguments used when the engine has begun planning the installation of a specific package. 735 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPackageBegin"/>
736 /// </summary> 736 /// </summary>
737 [Serializable] 737 [Serializable]
738 public class PlanPackageBeginEventArgs : CancellableHResultEventArgs 738 public class PlanPackageBeginEventArgs : CancellableHResultEventArgs
739 { 739 {
740 /// <summary> 740 /// <summary>
741 /// Creates a new instance of the <see cref="PlanPackageBeginEventArgs"/> class. 741 ///
742 /// </summary> 742 /// </summary>
743 /// <param name="packageId">The identity of the package to plan for.</param> 743 /// <param name="packageId"></param>
744 /// <param name="recommendedState">The recommended requested state for the package.</param> 744 /// <param name="currentState"></param>
745 /// <param name="state">The requested state for the package.</param> 745 /// <param name="installCondition"></param>
746 /// <param name="cancelRecommendation">The recommendation from the engine.</param> 746 /// <param name="recommendedState"></param>
747 public PlanPackageBeginEventArgs(string packageId, RequestState recommendedState, RequestState state, bool cancelRecommendation) 747 /// <param name="state"></param>
748 /// <param name="cancelRecommendation"></param>
749 public PlanPackageBeginEventArgs(string packageId, PackageState currentState, bool installCondition, RequestState recommendedState, RequestState state, bool cancelRecommendation)
748 : base(cancelRecommendation) 750 : base(cancelRecommendation)
749 { 751 {
750 this.PackageId = packageId; 752 this.PackageId = packageId;
753 this.CurrentState = currentState;
754 this.InstallCondition = installCondition;
751 this.RecommendedState = recommendedState; 755 this.RecommendedState = recommendedState;
752 this.State = state; 756 this.State = state;
753 } 757 }
@@ -758,6 +762,16 @@ namespace WixToolset.Mba.Core
758 public string PackageId { get; private set; } 762 public string PackageId { get; private set; }
759 763
760 /// <summary> 764 /// <summary>
765 /// Gets the current state of the package.
766 /// </summary>
767 public PackageState CurrentState { get; private set; }
768
769 /// <summary>
770 /// Gets the evaluated result of the package's install condition.
771 /// </summary>
772 public bool InstallCondition { get; private set; }
773
774 /// <summary>
761 /// Gets the recommended requested state for the package. 775 /// Gets the recommended requested state for the package.
762 /// </summary> 776 /// </summary>
763 public RequestState RecommendedState { get; private set; } 777 public RequestState RecommendedState { get; private set; }
@@ -769,20 +783,20 @@ namespace WixToolset.Mba.Core
769 } 783 }
770 784
771 /// <summary> 785 /// <summary>
772 /// Additional arguments used when engine is about to plan a MSP applied to a target MSI package. 786 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPatchTarget"/>
773 /// </summary> 787 /// </summary>
774 [Serializable] 788 [Serializable]
775 public class PlanTargetMsiPackageEventArgs : CancellableHResultEventArgs 789 public class PlanPatchTargetEventArgs : CancellableHResultEventArgs
776 { 790 {
777 /// <summary> 791 /// <summary>
778 /// Creates a new instance of the <see cref="PlanMsiFeatureEventArgs"/> class. 792 ///
779 /// </summary> 793 /// </summary>
780 /// <param name="packageId">Package identifier of the patch being planned.</param> 794 /// <param name="packageId"></param>
781 /// <param name="productCode">Product code identifier being planned.</param> 795 /// <param name="productCode"></param>
782 /// <param name="recommendedState">Recommended package state of the patch being planned.</param> 796 /// <param name="recommendedState"></param>
783 /// <param name="state">Package state of the patch being planned.</param> 797 /// <param name="state"></param>
784 /// <param name="cancelRecommendation">The recommendation from the engine.</param> 798 /// <param name="cancelRecommendation"></param>
785 public PlanTargetMsiPackageEventArgs(string packageId, string productCode, RequestState recommendedState, RequestState state, bool cancelRecommendation) 799 public PlanPatchTargetEventArgs(string packageId, string productCode, RequestState recommendedState, RequestState state, bool cancelRecommendation)
786 : base(cancelRecommendation) 800 : base(cancelRecommendation)
787 { 801 {
788 this.PackageId = packageId; 802 this.PackageId = packageId;
@@ -792,22 +806,22 @@ namespace WixToolset.Mba.Core
792 } 806 }
793 807
794 /// <summary> 808 /// <summary>
795 /// Gets the identity of the patch package to plan. 809 /// Gets the identity of the patch's package.
796 /// </summary> 810 /// </summary>
797 public string PackageId { get; private set; } 811 public string PackageId { get; private set; }
798 812
799 /// <summary> 813 /// <summary>
800 /// Gets the identity of the patch's target MSI to plan. 814 /// Gets the product code of the target.
801 /// </summary> 815 /// </summary>
802 public string ProductCode { get; private set; } 816 public string ProductCode { get; private set; }
803 817
804 /// <summary> 818 /// <summary>
805 /// Gets the recommended state of the patch to use by planning. 819 /// Gets the recommended state of the patch to use by planning for the target.
806 /// </summary> 820 /// </summary>
807 public RequestState RecommendedState { get; private set; } 821 public RequestState RecommendedState { get; private set; }
808 822
809 /// <summary> 823 /// <summary>
810 /// Gets or sets the state of the patch to use by planning. 824 /// Gets or sets the state of the patch to use by planning for the target.
811 /// </summary> 825 /// </summary>
812 public RequestState State { get; set; } 826 public RequestState State { get; set; }
813 } 827 }
@@ -915,28 +929,22 @@ namespace WixToolset.Mba.Core
915 } 929 }
916 930
917 /// <summary> 931 /// <summary>
918 /// Additional arguments used when then engine has completed planning the installation of a specific package. 932 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanPackageComplete"/>
919 /// </summary> 933 /// </summary>
920 [Serializable] 934 [Serializable]
921 public class PlanPackageCompleteEventArgs : StatusEventArgs 935 public class PlanPackageCompleteEventArgs : StatusEventArgs
922 { 936 {
923 /// <summary> 937 /// <summary>
924 /// Creates a new instance of the <see cref="PlanPackageCompleteEventArgs"/> class. 938 ///
925 /// </summary> 939 /// </summary>
926 /// <param name="packageId">The identity of the package planned for.</param> 940 /// <param name="packageId"></param>
927 /// <param name="hrStatus">The return code of the operation.</param> 941 /// <param name="hrStatus"></param>
928 /// <param name="state">The current state of the package.</param> 942 /// <param name="requested"></param>
929 /// <param name="requested">The requested state for the package</param> 943 public PlanPackageCompleteEventArgs(string packageId, int hrStatus, RequestState requested)
930 /// <param name="execute">The execution action to take.</param>
931 /// <param name="rollback">The rollback action to take.</param>
932 public PlanPackageCompleteEventArgs(string packageId, int hrStatus, PackageState state, RequestState requested, ActionState execute, ActionState rollback)
933 : base(hrStatus) 944 : base(hrStatus)
934 { 945 {
935 this.PackageId = packageId; 946 this.PackageId = packageId;
936 this.State = state;
937 this.Requested = requested; 947 this.Requested = requested;
938 this.Execute = execute;
939 this.Rollback = rollback;
940 } 948 }
941 949
942 /// <summary> 950 /// <summary>
@@ -945,22 +953,42 @@ namespace WixToolset.Mba.Core
945 public string PackageId { get; private set; } 953 public string PackageId { get; private set; }
946 954
947 /// <summary> 955 /// <summary>
948 /// Gets the current state of the package. 956 /// Gets the requested state for the package.
949 /// </summary> 957 /// </summary>
950 public PackageState State { get; private set; } 958 public RequestState Requested { get; private set; }
959 }
951 960
961 /// <summary>
962 /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlannedPackage"/>
963 /// </summary>
964 [Serializable]
965 public class PlannedPackageEventArgs : HResultEventArgs
966 {
952 /// <summary> 967 /// <summary>
953 /// Gets the requested state for the package. 968 ///
954 /// </summary> 969 /// </summary>
955 public RequestState Requested { get; private set; } 970 /// <param name="packageId"></param>
971 /// <param name="execute"></param>
972 /// <param name="rollback"></param>
973 public PlannedPackageEventArgs(string packageId, ActionState execute, ActionState rollback)
974 {
975 this.PackageId = packageId;
976 this.Execute = execute;
977 this.Rollback = rollback;
978 }
979
980 /// <summary>
981 /// Gets the identity of the package planned for.
982 /// </summary>
983 public string PackageId { get; private set; }
956 984
957 /// <summary> 985 /// <summary>
958 /// Gets the execution action to take. 986 /// Gets the planned execution action.
959 /// </summary> 987 /// </summary>
960 public ActionState Execute { get; private set; } 988 public ActionState Execute { get; private set; }
961 989
962 /// <summary> 990 /// <summary>
963 /// Gets the rollback action to take. 991 /// Gets the planned rollback action.
964 /// </summary> 992 /// </summary>
965 public ActionState Rollback { get; private set; } 993 public ActionState Rollback { get; private set; }
966 } 994 }