diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-04-19 17:35:44 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-04-19 23:23:39 -0500 |
| commit | 11fe2c881d182f9caff28bd9ff08c2e4fe513989 (patch) | |
| tree | a2f1769b78e9b1eb4708678fe6b5374eec209c6a /src/WixToolset.Mba.Core | |
| parent | 62b32cd6f21292c73dae8d5cfcd3a1cb13a1fd7d (diff) | |
| download | wix-11fe2c881d182f9caff28bd9ff08c2e4fe513989.tar.gz wix-11fe2c881d182f9caff28bd9ff08c2e4fe513989.tar.bz2 wix-11fe2c881d182f9caff28bd9ff08c2e4fe513989.zip | |
Add new caching BA events.
#3640
Diffstat (limited to 'src/WixToolset.Mba.Core')
| -rw-r--r-- | src/WixToolset.Mba.Core/BootstrapperApplication.cs | 195 | ||||
| -rw-r--r-- | src/WixToolset.Mba.Core/EventArgs.cs | 536 | ||||
| -rw-r--r-- | src/WixToolset.Mba.Core/IBootstrapperApplication.cs | 160 | ||||
| -rw-r--r-- | src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | 45 |
4 files changed, 604 insertions, 332 deletions
diff --git a/src/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/WixToolset.Mba.Core/BootstrapperApplication.cs index 79cbfa86..0a8f3af8 100644 --- a/src/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
| @@ -155,6 +155,9 @@ namespace WixToolset.Mba.Core | |||
| 155 | public event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin; | 155 | public event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin; |
| 156 | 156 | ||
| 157 | /// <inheritdoc/> | 157 | /// <inheritdoc/> |
| 158 | public event EventHandler<CacheVerifyProgressEventArgs> CacheVerifyProgress; | ||
| 159 | |||
| 160 | /// <inheritdoc/> | ||
| 158 | public event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete; | 161 | public event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete; |
| 159 | 162 | ||
| 160 | /// <inheritdoc/> | 163 | /// <inheritdoc/> |
| @@ -229,6 +232,24 @@ namespace WixToolset.Mba.Core | |||
| 229 | /// <inheritdoc/> | 232 | /// <inheritdoc/> |
| 230 | public event EventHandler<PlanForwardCompatibleBundleEventArgs> PlanForwardCompatibleBundle; | 233 | public event EventHandler<PlanForwardCompatibleBundleEventArgs> PlanForwardCompatibleBundle; |
| 231 | 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 | |||
| 232 | /// <summary> | 253 | /// <summary> |
| 233 | /// Entry point that is called when the bootstrapper application is ready to run. | 254 | /// Entry point that is called when the bootstrapper application is ready to run. |
| 234 | /// </summary> | 255 | /// </summary> |
| @@ -775,6 +796,19 @@ namespace WixToolset.Mba.Core | |||
| 775 | } | 796 | } |
| 776 | 797 | ||
| 777 | /// <summary> | 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> | ||
| 778 | /// Called by the engine, raises the <see cref="CacheVerifyComplete"/> event. | 812 | /// Called by the engine, raises the <see cref="CacheVerifyComplete"/> event. |
| 779 | /// </summary> | 813 | /// </summary> |
| 780 | /// <param name="args"></param> | 814 | /// <param name="args"></param> |
| @@ -1098,8 +1132,99 @@ namespace WixToolset.Mba.Core | |||
| 1098 | } | 1132 | } |
| 1099 | } | 1133 | } |
| 1100 | 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 | |||
| 1101 | #region IBootstrapperApplication Members | 1213 | #region IBootstrapperApplication Members |
| 1102 | 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 | |||
| 1103 | int IBootstrapperApplication.OnStartup() | 1228 | int IBootstrapperApplication.OnStartup() |
| 1104 | { | 1229 | { |
| 1105 | StartupEventArgs args = new StartupEventArgs(); | 1230 | StartupEventArgs args = new StartupEventArgs(); |
| @@ -1439,18 +1564,27 @@ namespace WixToolset.Mba.Core | |||
| 1439 | return args.HResult; | 1564 | return args.HResult; |
| 1440 | } | 1565 | } |
| 1441 | 1566 | ||
| 1442 | int IBootstrapperApplication.OnCacheVerifyBegin(string wzPackageId, string wzPayloadId, ref bool fCancel) | 1567 | int IBootstrapperApplication.OnCacheVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) |
| 1443 | { | 1568 | { |
| 1444 | CacheVerifyBeginEventArgs args = new CacheVerifyBeginEventArgs(wzPackageId, wzPayloadId, fCancel); | 1569 | CacheVerifyBeginEventArgs args = new CacheVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); |
| 1445 | this.OnCacheVerifyBegin(args); | 1570 | this.OnCacheVerifyBegin(args); |
| 1446 | 1571 | ||
| 1447 | fCancel = args.Cancel; | 1572 | fCancel = args.Cancel; |
| 1448 | return args.HResult; | 1573 | return args.HResult; |
| 1449 | } | 1574 | } |
| 1450 | 1575 | ||
| 1451 | int IBootstrapperApplication.OnCacheVerifyComplete(string wzPackageId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) | 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) | ||
| 1452 | { | 1586 | { |
| 1453 | CacheVerifyCompleteEventArgs args = new CacheVerifyCompleteEventArgs(wzPackageId, wzPayloadId, hrStatus, recommendation, action); | 1587 | CacheVerifyCompleteEventArgs args = new CacheVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action); |
| 1454 | this.OnCacheVerifyComplete(args); | 1588 | this.OnCacheVerifyComplete(args); |
| 1455 | 1589 | ||
| 1456 | action = args.Action; | 1590 | action = args.Action; |
| @@ -1682,17 +1816,56 @@ namespace WixToolset.Mba.Core | |||
| 1682 | return args.HResult; | 1816 | return args.HResult; |
| 1683 | } | 1817 | } |
| 1684 | 1818 | ||
| 1685 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) | 1819 | int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) |
| 1686 | { | 1820 | { |
| 1687 | switch (message) | 1821 | CacheContainerOrPayloadVerifyBeginEventArgs args = new CacheContainerOrPayloadVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); |
| 1688 | { | 1822 | this.OnCacheContainerOrPayloadVerifyBegin(args); |
| 1689 | default: | 1823 | |
| 1690 | return NativeMethods.E_NOTIMPL; | 1824 | fCancel = args.Cancel; |
| 1691 | } | 1825 | return args.HResult; |
| 1692 | } | 1826 | } |
| 1693 | 1827 | ||
| 1694 | void IBootstrapperApplication.BAProcFallback(int message, IntPtr pvArgs, IntPtr pvResults, ref int phr, IntPtr pvContext) | 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) | ||
| 1695 | { | 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; | ||
| 1696 | } | 1869 | } |
| 1697 | 1870 | ||
| 1698 | #endregion | 1871 | #endregion |
diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs index ee89b583..e64f6d2c 100644 --- a/src/WixToolset.Mba.Core/EventArgs.cs +++ b/src/WixToolset.Mba.Core/EventArgs.cs | |||
| @@ -51,11 +51,7 @@ namespace WixToolset.Mba.Core | |||
| 51 | [Serializable] | 51 | [Serializable] |
| 52 | public abstract class ResultEventArgs : HResultEventArgs | 52 | public abstract class ResultEventArgs : HResultEventArgs |
| 53 | { | 53 | { |
| 54 | /// <summary> | 54 | /// <summary /> |
| 55 | /// Creates a new instance of the <see cref="ResultEventArgs"/> class. | ||
| 56 | /// </summary> | ||
| 57 | /// <param name="recommendation">Recommended result from engine.</param> | ||
| 58 | /// <param name="result">The result to return to the engine.</param> | ||
| 59 | public ResultEventArgs(Result recommendation, Result result) | 55 | public ResultEventArgs(Result recommendation, Result result) |
| 60 | { | 56 | { |
| 61 | this.Recommendation = recommendation; | 57 | this.Recommendation = recommendation; |
| @@ -99,11 +95,7 @@ namespace WixToolset.Mba.Core | |||
| 99 | /// </summary> | 95 | /// </summary> |
| 100 | public abstract class ActionEventArgs<T> : StatusEventArgs | 96 | public abstract class ActionEventArgs<T> : StatusEventArgs |
| 101 | { | 97 | { |
| 102 | /// <summary> | 98 | /// <summary /> |
| 103 | /// </summary> | ||
| 104 | /// <param name="hrStatus">The return code of the operation.</param> | ||
| 105 | /// <param name="recommendation">Recommended action from engine.</param> | ||
| 106 | /// <param name="action">The action to perform.</param> | ||
| 107 | public ActionEventArgs(int hrStatus, T recommendation, T action) | 99 | public ActionEventArgs(int hrStatus, T recommendation, T action) |
| 108 | : base(hrStatus) | 100 | : base(hrStatus) |
| 109 | { | 101 | { |
| @@ -148,6 +140,49 @@ namespace WixToolset.Mba.Core | |||
| 148 | } | 140 | } |
| 149 | 141 | ||
| 150 | /// <summary> | 142 | /// <summary> |
| 143 | /// Base class for cache progress events. | ||
| 144 | /// </summary> | ||
| 145 | [Serializable] | ||
| 146 | public abstract class CacheProgressBaseEventArgs : CancellableHResultEventArgs | ||
| 147 | { | ||
| 148 | /// <summary /> | ||
| 149 | public CacheProgressBaseEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) | ||
| 150 | : base(cancelRecommendation) | ||
| 151 | { | ||
| 152 | this.PackageOrContainerId = packageOrContainerId; | ||
| 153 | this.PayloadId = payloadId; | ||
| 154 | this.Progress = progress; | ||
| 155 | this.Total = total; | ||
| 156 | this.OverallPercentage = overallPercentage; | ||
| 157 | } | ||
| 158 | |||
| 159 | /// <summary> | ||
| 160 | /// Gets the identifier of the container or package. | ||
| 161 | /// </summary> | ||
| 162 | public string PackageOrContainerId { get; private set; } | ||
| 163 | |||
| 164 | /// <summary> | ||
| 165 | /// Gets the identifier of the payload. | ||
| 166 | /// </summary> | ||
| 167 | public string PayloadId { get; private set; } | ||
| 168 | |||
| 169 | /// <summary> | ||
| 170 | /// Gets the number of bytes cached thus far. | ||
| 171 | /// </summary> | ||
| 172 | public long Progress { get; private set; } | ||
| 173 | |||
| 174 | /// <summary> | ||
| 175 | /// Gets the total bytes to cache. | ||
| 176 | /// </summary> | ||
| 177 | public long Total { get; private set; } | ||
| 178 | |||
| 179 | /// <summary> | ||
| 180 | /// Gets the overall percentage of progress of caching. | ||
| 181 | /// </summary> | ||
| 182 | public int OverallPercentage { get; private set; } | ||
| 183 | } | ||
| 184 | |||
| 185 | /// <summary> | ||
| 151 | /// Additional arguments used when startup has begun. | 186 | /// Additional arguments used when startup has begun. |
| 152 | /// </summary> | 187 | /// </summary> |
| 153 | [Serializable] | 188 | [Serializable] |
| @@ -182,25 +217,12 @@ namespace WixToolset.Mba.Core | |||
| 182 | } | 217 | } |
| 183 | 218 | ||
| 184 | /// <summary> | 219 | /// <summary> |
| 185 | /// Additional arguments used when the system is shutting down or the user is logging off. | 220 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.SystemShutdown"/> |
| 186 | /// </summary> | 221 | /// </summary> |
| 187 | /// <remarks> | ||
| 188 | /// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to | ||
| 189 | /// true; otherwise, set it to false.</para> | ||
| 190 | /// <para>By default setup will prevent shutting down or logging off between | ||
| 191 | /// <see cref="IDefaultBootstrapperApplication.ApplyBegin"/> and <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>.</para> | ||
| 192 | /// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/> | ||
| 193 | /// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other | ||
| 194 | /// critical operations before being closed by the operating system.</para> | ||
| 195 | /// </remarks> | ||
| 196 | [Serializable] | 222 | [Serializable] |
| 197 | public class SystemShutdownEventArgs : CancellableHResultEventArgs | 223 | public class SystemShutdownEventArgs : CancellableHResultEventArgs |
| 198 | { | 224 | { |
| 199 | /// <summary> | 225 | /// <summary /> |
| 200 | /// Creates a new instance of the <see cref="SystemShutdownEventArgs"/> class. | ||
| 201 | /// </summary> | ||
| 202 | /// <param name="reasons">The reason the application is requested to close or being closed.</param> | ||
| 203 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 204 | public SystemShutdownEventArgs(EndSessionReasons reasons, bool cancelRecommendation) | 226 | public SystemShutdownEventArgs(EndSessionReasons reasons, bool cancelRecommendation) |
| 205 | : base(cancelRecommendation) | 227 | : base(cancelRecommendation) |
| 206 | { | 228 | { |
| @@ -301,17 +323,12 @@ namespace WixToolset.Mba.Core | |||
| 301 | } | 323 | } |
| 302 | 324 | ||
| 303 | /// <summary> | 325 | /// <summary> |
| 304 | /// Additional arguments used when the detection for an update has begun. | 326 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectUpdateBegin"/> |
| 305 | /// </summary> | 327 | /// </summary> |
| 306 | [Serializable] | 328 | [Serializable] |
| 307 | public class DetectUpdateBeginEventArgs : CancellableHResultEventArgs | 329 | public class DetectUpdateBeginEventArgs : CancellableHResultEventArgs |
| 308 | { | 330 | { |
| 309 | /// <summary> | 331 | /// <summary /> |
| 310 | /// Creates a new instance of the <see cref="DetectUpdateBeginEventArgs"/> class. | ||
| 311 | /// </summary> | ||
| 312 | /// <param name="updateLocation">The location to check for an updated bundle.</param> | ||
| 313 | /// <param name="cancelRecommendation">The cancel recommendation from the engine.</param> | ||
| 314 | /// <param name="skipRecommendation">The skip recommendation from the engine.</param> | ||
| 315 | public DetectUpdateBeginEventArgs(string updateLocation, bool cancelRecommendation, bool skipRecommendation) | 332 | public DetectUpdateBeginEventArgs(string updateLocation, bool cancelRecommendation, bool skipRecommendation) |
| 316 | : base(cancelRecommendation) | 333 | : base(cancelRecommendation) |
| 317 | { | 334 | { |
| @@ -331,23 +348,12 @@ namespace WixToolset.Mba.Core | |||
| 331 | } | 348 | } |
| 332 | 349 | ||
| 333 | /// <summary> | 350 | /// <summary> |
| 334 | /// Additional arguments used when the detection for an update has begun. | 351 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectUpdate"/> |
| 335 | /// </summary> | 352 | /// </summary> |
| 336 | [Serializable] | 353 | [Serializable] |
| 337 | public class DetectUpdateEventArgs : CancellableHResultEventArgs | 354 | public class DetectUpdateEventArgs : CancellableHResultEventArgs |
| 338 | { | 355 | { |
| 339 | /// <summary> | 356 | /// <summary /> |
| 340 | /// Creates a new instance of the <see cref="DetectUpdateBeginEventArgs"/> class. | ||
| 341 | /// </summary> | ||
| 342 | /// <param name="updateLocation">The location to check for an updated bundle.</param> | ||
| 343 | /// <param name="size">The expected size of the updated bundle.</param> | ||
| 344 | /// <param name="version">The expected version of the updated bundle.</param> | ||
| 345 | /// <param name="title">The title of the updated bundle.</param> | ||
| 346 | /// <param name="summary">The summary of the updated bundle.</param> | ||
| 347 | /// <param name="contentType">The content type of the content of the updated bundle.</param> | ||
| 348 | /// <param name="content">The content of the updated bundle.</param> | ||
| 349 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 350 | /// <param name="stopRecommendation">The recommendation from the engine.</param> | ||
| 351 | public DetectUpdateEventArgs(string updateLocation, long size, string version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation) | 357 | public DetectUpdateEventArgs(string updateLocation, long size, string version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation) |
| 352 | : base(cancelRecommendation) | 358 | : base(cancelRecommendation) |
| 353 | { | 359 | { |
| @@ -403,16 +409,12 @@ namespace WixToolset.Mba.Core | |||
| 403 | } | 409 | } |
| 404 | 410 | ||
| 405 | /// <summary> | 411 | /// <summary> |
| 406 | /// Additional arguments used when the detection for an update has completed. | 412 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectUpdateComplete"/> |
| 407 | /// </summary> | 413 | /// </summary> |
| 408 | [Serializable] | 414 | [Serializable] |
| 409 | public class DetectUpdateCompleteEventArgs : StatusEventArgs | 415 | public class DetectUpdateCompleteEventArgs : StatusEventArgs |
| 410 | { | 416 | { |
| 411 | /// <summary> | 417 | /// <summary /> |
| 412 | /// Creates a new instance of the <see cref="DetectUpdateCompleteEventArgs"/> class. | ||
| 413 | /// </summary> | ||
| 414 | /// <param name="hrStatus">The return code of the operation.</param> | ||
| 415 | /// <param name="ignoreRecommendation">The recommendation from the engine.</param> | ||
| 416 | public DetectUpdateCompleteEventArgs(int hrStatus, bool ignoreRecommendation) | 418 | public DetectUpdateCompleteEventArgs(int hrStatus, bool ignoreRecommendation) |
| 417 | : base(hrStatus) | 419 | : base(hrStatus) |
| 418 | { | 420 | { |
| @@ -481,16 +483,12 @@ namespace WixToolset.Mba.Core | |||
| 481 | } | 483 | } |
| 482 | 484 | ||
| 483 | /// <summary> | 485 | /// <summary> |
| 484 | /// Additional arguments used when the detection for a specific package has begun. | 486 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectPackageBegin"/> |
| 485 | /// </summary> | 487 | /// </summary> |
| 486 | [Serializable] | 488 | [Serializable] |
| 487 | public class DetectPackageBeginEventArgs : CancellableHResultEventArgs | 489 | public class DetectPackageBeginEventArgs : CancellableHResultEventArgs |
| 488 | { | 490 | { |
| 489 | /// <summary> | 491 | /// <summary /> |
| 490 | /// Creates a new instance of the <see cref="DetectPackageBeginEventArgs"/> class. | ||
| 491 | /// </summary> | ||
| 492 | /// <param name="packageId">The identity of the package to detect.</param> | ||
| 493 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 494 | public DetectPackageBeginEventArgs(string packageId, bool cancelRecommendation) | 492 | public DetectPackageBeginEventArgs(string packageId, bool cancelRecommendation) |
| 495 | : base(cancelRecommendation) | 493 | : base(cancelRecommendation) |
| 496 | { | 494 | { |
| @@ -504,21 +502,12 @@ namespace WixToolset.Mba.Core | |||
| 504 | } | 502 | } |
| 505 | 503 | ||
| 506 | /// <summary> | 504 | /// <summary> |
| 507 | /// Additional arguments used when a related MSI package has been detected for a package. | 505 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectRelatedMsiPackage"/> |
| 508 | /// </summary> | 506 | /// </summary> |
| 509 | [Serializable] | 507 | [Serializable] |
| 510 | public class DetectRelatedMsiPackageEventArgs : CancellableHResultEventArgs | 508 | public class DetectRelatedMsiPackageEventArgs : CancellableHResultEventArgs |
| 511 | { | 509 | { |
| 512 | /// <summary> | 510 | /// <summary /> |
| 513 | /// Creates a new instance of the <see cref="DetectRelatedMsiPackageEventArgs"/> class. | ||
| 514 | /// </summary> | ||
| 515 | /// <param name="packageId">The identity of the package detecting.</param> | ||
| 516 | /// <param name="upgradeCode">The upgrade code of the related package detected.</param> | ||
| 517 | /// <param name="productCode">The identity of the related package detected.</param> | ||
| 518 | /// <param name="perMachine">Whether the detected package is per machine.</param> | ||
| 519 | /// <param name="version">The version of the related package detected.</param> | ||
| 520 | /// <param name="operation">The operation that will be taken on the detected package.</param> | ||
| 521 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 522 | public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation) | 511 | public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation) |
| 523 | : base(cancelRecommendation) | 512 | : base(cancelRecommendation) |
| 524 | { | 513 | { |
| @@ -598,17 +587,11 @@ namespace WixToolset.Mba.Core | |||
| 598 | } | 587 | } |
| 599 | 588 | ||
| 600 | /// <summary> | 589 | /// <summary> |
| 601 | /// Additional arguments used when a feature in an MSI package has been detected. | 590 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectMsiFeature"/> |
| 602 | /// </summary> | 591 | /// </summary> |
| 603 | public class DetectMsiFeatureEventArgs : CancellableHResultEventArgs | 592 | public class DetectMsiFeatureEventArgs : CancellableHResultEventArgs |
| 604 | { | 593 | { |
| 605 | /// <summary> | 594 | /// <summary /> |
| 606 | /// Creates a new instance of the <see cref="DetectMsiFeatureEventArgs"/> class. | ||
| 607 | /// </summary> | ||
| 608 | /// <param name="packageId">Detected package identifier.</param> | ||
| 609 | /// <param name="featureId">Detected feature identifier.</param> | ||
| 610 | /// <param name="state">Feature state detected.</param> | ||
| 611 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 612 | public DetectMsiFeatureEventArgs(string packageId, string featureId, FeatureState state, bool cancelRecommendation) | 595 | public DetectMsiFeatureEventArgs(string packageId, string featureId, FeatureState state, bool cancelRecommendation) |
| 613 | : base(cancelRecommendation) | 596 | : base(cancelRecommendation) |
| 614 | { | 597 | { |
| @@ -687,16 +670,12 @@ namespace WixToolset.Mba.Core | |||
| 687 | } | 670 | } |
| 688 | 671 | ||
| 689 | /// <summary> | 672 | /// <summary> |
| 690 | /// Additional arguments used when the engine has begun planning the installation. | 673 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanBegin"/> |
| 691 | /// </summary> | 674 | /// </summary> |
| 692 | [Serializable] | 675 | [Serializable] |
| 693 | public class PlanBeginEventArgs : CancellableHResultEventArgs | 676 | public class PlanBeginEventArgs : CancellableHResultEventArgs |
| 694 | { | 677 | { |
| 695 | /// <summary> | 678 | /// <summary /> |
| 696 | /// Creates a new instance of the <see cref="PlanBeginEventArgs"/> class. | ||
| 697 | /// </summary> | ||
| 698 | /// <param name="packageCount">The number of packages to plan for.</param> | ||
| 699 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 700 | public PlanBeginEventArgs(int packageCount, bool cancelRecommendation) | 679 | public PlanBeginEventArgs(int packageCount, bool cancelRecommendation) |
| 701 | : base(cancelRecommendation) | 680 | : base(cancelRecommendation) |
| 702 | { | 681 | { |
| @@ -710,18 +689,12 @@ namespace WixToolset.Mba.Core | |||
| 710 | } | 689 | } |
| 711 | 690 | ||
| 712 | /// <summary> | 691 | /// <summary> |
| 713 | /// Additional arguments used when the engine has begun planning for a related bundle. | 692 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanRelatedBundle"/> |
| 714 | /// </summary> | 693 | /// </summary> |
| 715 | [Serializable] | 694 | [Serializable] |
| 716 | public class PlanRelatedBundleEventArgs : CancellableHResultEventArgs | 695 | public class PlanRelatedBundleEventArgs : CancellableHResultEventArgs |
| 717 | { | 696 | { |
| 718 | /// <summary> | 697 | /// <summary /> |
| 719 | /// Creates a new instance of the <see cref="PlanRelatedBundleEventArgs"/> class. | ||
| 720 | /// </summary> | ||
| 721 | /// <param name="bundleId">The identity of the bundle to plan for.</param> | ||
| 722 | /// <param name="recommendedState">The recommended requested state for the bundle.</param> | ||
| 723 | /// <param name="state">The requested state for the bundle.</param> | ||
| 724 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 725 | public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) | 698 | public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) |
| 726 | : base(cancelRecommendation) | 699 | : base(cancelRecommendation) |
| 727 | { | 700 | { |
| @@ -842,19 +815,12 @@ namespace WixToolset.Mba.Core | |||
| 842 | } | 815 | } |
| 843 | 816 | ||
| 844 | /// <summary> | 817 | /// <summary> |
| 845 | /// Additional arguments used when engine is about to plan a feature in an MSI package. | 818 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanMsiFeature"/> |
| 846 | /// </summary> | 819 | /// </summary> |
| 847 | [Serializable] | 820 | [Serializable] |
| 848 | public class PlanMsiFeatureEventArgs : CancellableHResultEventArgs | 821 | public class PlanMsiFeatureEventArgs : CancellableHResultEventArgs |
| 849 | { | 822 | { |
| 850 | /// <summary> | 823 | /// <summary /> |
| 851 | /// Creates a new instance of the <see cref="PlanMsiFeatureEventArgs"/> class. | ||
| 852 | /// </summary> | ||
| 853 | /// <param name="packageId">Package identifier being planned.</param> | ||
| 854 | /// <param name="featureId">Feature identifier being planned.</param> | ||
| 855 | /// <param name="recommendedState">Recommended feature state being planned.</param> | ||
| 856 | /// <param name="state">Feature state being planned.</param> | ||
| 857 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 858 | public PlanMsiFeatureEventArgs(string packageId, string featureId, FeatureState recommendedState, FeatureState state, bool cancelRecommendation) | 824 | public PlanMsiFeatureEventArgs(string packageId, string featureId, FeatureState recommendedState, FeatureState state, bool cancelRecommendation) |
| 859 | : base(cancelRecommendation) | 825 | : base(cancelRecommendation) |
| 860 | { | 826 | { |
| @@ -886,21 +852,12 @@ namespace WixToolset.Mba.Core | |||
| 886 | } | 852 | } |
| 887 | 853 | ||
| 888 | /// <summary> | 854 | /// <summary> |
| 889 | /// Additional arguments used when the engine is planning an MSI or MSP package. | 855 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanMsiPackage"/> |
| 890 | /// </summary> | 856 | /// </summary> |
| 891 | [Serializable] | 857 | [Serializable] |
| 892 | public class PlanMsiPackageEventArgs : CancellableHResultEventArgs | 858 | public class PlanMsiPackageEventArgs : CancellableHResultEventArgs |
| 893 | { | 859 | { |
| 894 | /// <summary> | 860 | /// <summary /> |
| 895 | /// Creates a new instance of the <see cref="PlanMsiPackageEventArgs"/> class. | ||
| 896 | /// </summary> | ||
| 897 | /// <param name="packageId">The identity of the package planned for.</param> | ||
| 898 | /// <param name="shouldExecute">Whether the package is planned to execute or roll back.</param> | ||
| 899 | /// <param name="action">The action planned for the package.</param> | ||
| 900 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 901 | /// <param name="actionMsiProperty">The requested MSI property to add.</param> | ||
| 902 | /// <param name="uiLevel">The requested internal UI level.</param> | ||
| 903 | /// <param name="disableExternalUiHandler">Whether Burn is requested to set up an external UI handler.</param> | ||
| 904 | public PlanMsiPackageEventArgs(string packageId, bool shouldExecute, ActionState action, bool cancelRecommendation, BURN_MSI_PROPERTY actionMsiProperty, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler) | 861 | public PlanMsiPackageEventArgs(string packageId, bool shouldExecute, ActionState action, bool cancelRecommendation, BURN_MSI_PROPERTY actionMsiProperty, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler) |
| 905 | : base(cancelRecommendation) | 862 | : base(cancelRecommendation) |
| 906 | { | 863 | { |
| @@ -1080,16 +1037,12 @@ namespace WixToolset.Mba.Core | |||
| 1080 | } | 1037 | } |
| 1081 | 1038 | ||
| 1082 | /// <summary> | 1039 | /// <summary> |
| 1083 | /// Additional arguments used when the engine has begun installing the bundle. | 1040 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ApplyBegin"/> |
| 1084 | /// </summary> | 1041 | /// </summary> |
| 1085 | [Serializable] | 1042 | [Serializable] |
| 1086 | public class ApplyBeginEventArgs : CancellableHResultEventArgs | 1043 | public class ApplyBeginEventArgs : CancellableHResultEventArgs |
| 1087 | { | 1044 | { |
| 1088 | /// <summary> | 1045 | /// <summary /> |
| 1089 | /// Creates a new instance of the <see cref="ApplyBeginEventArgs"/> class. | ||
| 1090 | /// </summary> | ||
| 1091 | /// <param name="phaseCount">The number of phases during apply.</param> | ||
| 1092 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1093 | public ApplyBeginEventArgs(int phaseCount, bool cancelRecommendation) | 1046 | public ApplyBeginEventArgs(int phaseCount, bool cancelRecommendation) |
| 1094 | : base(cancelRecommendation) | 1047 | : base(cancelRecommendation) |
| 1095 | { | 1048 | { |
| @@ -1104,15 +1057,12 @@ namespace WixToolset.Mba.Core | |||
| 1104 | } | 1057 | } |
| 1105 | 1058 | ||
| 1106 | /// <summary> | 1059 | /// <summary> |
| 1107 | /// Additional arguments used when the engine is about to start the elevated process. | 1060 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ElevateBegin"/> |
| 1108 | /// </summary> | 1061 | /// </summary> |
| 1109 | [Serializable] | 1062 | [Serializable] |
| 1110 | public class ElevateBeginEventArgs : CancellableHResultEventArgs | 1063 | public class ElevateBeginEventArgs : CancellableHResultEventArgs |
| 1111 | { | 1064 | { |
| 1112 | /// <summary> | 1065 | /// <summary /> |
| 1113 | /// Creates a new instance of the <see cref="ElevateBeginEventArgs"/> class. | ||
| 1114 | /// </summary> | ||
| 1115 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1116 | public ElevateBeginEventArgs(bool cancelRecommendation) | 1066 | public ElevateBeginEventArgs(bool cancelRecommendation) |
| 1117 | : base(cancelRecommendation) | 1067 | : base(cancelRecommendation) |
| 1118 | { | 1068 | { |
| @@ -1136,17 +1086,12 @@ namespace WixToolset.Mba.Core | |||
| 1136 | } | 1086 | } |
| 1137 | 1087 | ||
| 1138 | /// <summary> | 1088 | /// <summary> |
| 1139 | /// Additional arguments used when the engine has changed progress for the bundle installation. | 1089 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.Progress"/> |
| 1140 | /// </summary> | 1090 | /// </summary> |
| 1141 | [Serializable] | 1091 | [Serializable] |
| 1142 | public class ProgressEventArgs : CancellableHResultEventArgs | 1092 | public class ProgressEventArgs : CancellableHResultEventArgs |
| 1143 | { | 1093 | { |
| 1144 | /// <summary> | 1094 | /// <summary /> |
| 1145 | /// Creates an new instance of the <see cref="ProgressEventArgs"/> class. | ||
| 1146 | /// </summary> | ||
| 1147 | /// <param name="progressPercentage">The percentage from 0 to 100 completed for a package.</param> | ||
| 1148 | /// <param name="overallPercentage">The percentage from 0 to 100 completed for the bundle.</param> | ||
| 1149 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1150 | public ProgressEventArgs(int progressPercentage, int overallPercentage, bool cancelRecommendation) | 1095 | public ProgressEventArgs(int progressPercentage, int overallPercentage, bool cancelRecommendation) |
| 1151 | : base(cancelRecommendation) | 1096 | : base(cancelRecommendation) |
| 1152 | { | 1097 | { |
| @@ -1166,22 +1111,12 @@ namespace WixToolset.Mba.Core | |||
| 1166 | } | 1111 | } |
| 1167 | 1112 | ||
| 1168 | /// <summary> | 1113 | /// <summary> |
| 1169 | /// Additional arguments used when the engine has encountered an error. | 1114 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.Error"/> |
| 1170 | /// </summary> | 1115 | /// </summary> |
| 1171 | [Serializable] | 1116 | [Serializable] |
| 1172 | public class ErrorEventArgs : ResultEventArgs | 1117 | public class ErrorEventArgs : ResultEventArgs |
| 1173 | { | 1118 | { |
| 1174 | /// <summary> | 1119 | /// <summary /> |
| 1175 | /// Creates a new instance of the <see cref="ErrorEventArgs"/> class. | ||
| 1176 | /// </summary> | ||
| 1177 | /// <param name="errorType">The error type.</param> | ||
| 1178 | /// <param name="packageId">The identity of the package that yielded the error.</param> | ||
| 1179 | /// <param name="errorCode">The error code.</param> | ||
| 1180 | /// <param name="errorMessage">The error message.</param> | ||
| 1181 | /// <param name="dwUIHint">Recommended display flags for an error dialog.</param> | ||
| 1182 | /// <param name="data">The exteded data for the error.</param> | ||
| 1183 | /// <param name="recommendation">Recommended result from engine.</param> | ||
| 1184 | /// <param name="result">The result to return to the engine.</param> | ||
| 1185 | public ErrorEventArgs(ErrorType errorType, string packageId, int errorCode, string errorMessage, int dwUIHint, string[] data, Result recommendation, Result result) | 1120 | public ErrorEventArgs(ErrorType errorType, string packageId, int errorCode, string errorMessage, int dwUIHint, string[] data, Result recommendation, Result result) |
| 1186 | : base(recommendation, result) | 1121 | : base(recommendation, result) |
| 1187 | { | 1122 | { |
| @@ -1225,15 +1160,12 @@ namespace WixToolset.Mba.Core | |||
| 1225 | } | 1160 | } |
| 1226 | 1161 | ||
| 1227 | /// <summary> | 1162 | /// <summary> |
| 1228 | /// Additional arguments used when the engine has begun registering the location and visibility of the bundle. | 1163 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.RegisterBegin"/> |
| 1229 | /// </summary> | 1164 | /// </summary> |
| 1230 | [Serializable] | 1165 | [Serializable] |
| 1231 | public class RegisterBeginEventArgs : CancellableHResultEventArgs | 1166 | public class RegisterBeginEventArgs : CancellableHResultEventArgs |
| 1232 | { | 1167 | { |
| 1233 | /// <summary> | 1168 | /// <summary /> |
| 1234 | /// Creates a new instance of the <see cref="RegisterBeginEventArgs"/> class. | ||
| 1235 | /// </summary> | ||
| 1236 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1237 | public RegisterBeginEventArgs(bool cancelRecommendation) | 1169 | public RegisterBeginEventArgs(bool cancelRecommendation) |
| 1238 | : base(cancelRecommendation) | 1170 | : base(cancelRecommendation) |
| 1239 | { | 1171 | { |
| @@ -1301,15 +1233,12 @@ namespace WixToolset.Mba.Core | |||
| 1301 | } | 1233 | } |
| 1302 | 1234 | ||
| 1303 | /// <summary> | 1235 | /// <summary> |
| 1304 | /// Additional arguments used when the engine has begun caching the installation sources. | 1236 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.CacheBegin"/> |
| 1305 | /// </summary> | 1237 | /// </summary> |
| 1306 | [Serializable] | 1238 | [Serializable] |
| 1307 | public class CacheBeginEventArgs : CancellableHResultEventArgs | 1239 | public class CacheBeginEventArgs : CancellableHResultEventArgs |
| 1308 | { | 1240 | { |
| 1309 | /// <summary> | 1241 | /// <summary /> |
| 1310 | /// Creates a new instance of the <see cref="CacheBeginEventArgs"/> class. | ||
| 1311 | /// </summary> | ||
| 1312 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1313 | public CacheBeginEventArgs(bool cancelRecommendation) | 1242 | public CacheBeginEventArgs(bool cancelRecommendation) |
| 1314 | : base(cancelRecommendation) | 1243 | : base(cancelRecommendation) |
| 1315 | { | 1244 | { |
| @@ -1363,43 +1292,13 @@ namespace WixToolset.Mba.Core | |||
| 1363 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheAcquireProgress"/>. | 1292 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheAcquireProgress"/>. |
| 1364 | /// </summary> | 1293 | /// </summary> |
| 1365 | [Serializable] | 1294 | [Serializable] |
| 1366 | public class CacheAcquireProgressEventArgs : CancellableHResultEventArgs | 1295 | public class CacheAcquireProgressEventArgs : CacheProgressBaseEventArgs |
| 1367 | { | 1296 | { |
| 1368 | /// <summary /> | 1297 | /// <summary /> |
| 1369 | public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) | 1298 | public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) |
| 1370 | : base(cancelRecommendation) | 1299 | : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) |
| 1371 | { | 1300 | { |
| 1372 | this.PackageOrContainerId = packageOrContainerId; | ||
| 1373 | this.PayloadId = payloadId; | ||
| 1374 | this.Progress = progress; | ||
| 1375 | this.Total = total; | ||
| 1376 | this.OverallPercentage = overallPercentage; | ||
| 1377 | } | 1301 | } |
| 1378 | |||
| 1379 | /// <summary> | ||
| 1380 | /// Gets the identifier of the container or package. | ||
| 1381 | /// </summary> | ||
| 1382 | public string PackageOrContainerId { get; private set; } | ||
| 1383 | |||
| 1384 | /// <summary> | ||
| 1385 | /// Gets the identifier of the payload (if acquiring a payload). | ||
| 1386 | /// </summary> | ||
| 1387 | public string PayloadId { get; private set; } | ||
| 1388 | |||
| 1389 | /// <summary> | ||
| 1390 | /// Gets the number of bytes cached thus far. | ||
| 1391 | /// </summary> | ||
| 1392 | public long Progress { get; private set; } | ||
| 1393 | |||
| 1394 | /// <summary> | ||
| 1395 | /// Gets the total bytes to cache. | ||
| 1396 | /// </summary> | ||
| 1397 | public long Total { get; private set; } | ||
| 1398 | |||
| 1399 | /// <summary> | ||
| 1400 | /// Gets the overall percentage of progress of caching. | ||
| 1401 | /// </summary> | ||
| 1402 | public int OverallPercentage { get; private set; } | ||
| 1403 | } | 1302 | } |
| 1404 | 1303 | ||
| 1405 | /// <summary> | 1304 | /// <summary> |
| @@ -1428,25 +1327,23 @@ namespace WixToolset.Mba.Core | |||
| 1428 | } | 1327 | } |
| 1429 | 1328 | ||
| 1430 | /// <summary> | 1329 | /// <summary> |
| 1431 | /// Additional arguments used when the engine starts the verification of a payload. | 1330 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheVerifyBegin"/>. |
| 1432 | /// </summary> | 1331 | /// </summary> |
| 1433 | [Serializable] | 1332 | [Serializable] |
| 1434 | public class CacheVerifyBeginEventArgs : CancellableHResultEventArgs | 1333 | public class CacheVerifyBeginEventArgs : CancellableHResultEventArgs |
| 1435 | { | 1334 | { |
| 1436 | /// <summary> | 1335 | /// <summary /> |
| 1437 | /// Creates a new instance of the <see cref="CacheVerifyBeginEventArgs"/> class. | 1336 | public CacheVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) |
| 1438 | /// </summary> | ||
| 1439 | public CacheVerifyBeginEventArgs(string packageId, string payloadId, bool cancelRecommendation) | ||
| 1440 | : base(cancelRecommendation) | 1337 | : base(cancelRecommendation) |
| 1441 | { | 1338 | { |
| 1442 | this.PackageId = packageId; | 1339 | this.PackageOrContainerId = packageOrContainerId; |
| 1443 | this.PayloadId = payloadId; | 1340 | this.PayloadId = payloadId; |
| 1444 | } | 1341 | } |
| 1445 | 1342 | ||
| 1446 | /// <summary> | 1343 | /// <summary> |
| 1447 | /// Gets the identifier of the package. | 1344 | /// Gets the identifier of the container or package. |
| 1448 | /// </summary> | 1345 | /// </summary> |
| 1449 | public string PackageId { get; private set; } | 1346 | public string PackageOrContainerId { get; private set; } |
| 1450 | 1347 | ||
| 1451 | /// <summary> | 1348 | /// <summary> |
| 1452 | /// Gets the identifier of the payload. | 1349 | /// Gets the identifier of the payload. |
| @@ -1455,25 +1352,42 @@ namespace WixToolset.Mba.Core | |||
| 1455 | } | 1352 | } |
| 1456 | 1353 | ||
| 1457 | /// <summary> | 1354 | /// <summary> |
| 1458 | /// Additional arguments used when the engine completes the verification of a payload. | 1355 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheVerifyProgress"/>. |
| 1459 | /// </summary> | 1356 | /// </summary> |
| 1460 | [Serializable] | 1357 | [Serializable] |
| 1461 | public class CacheVerifyCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION> | 1358 | public class CacheVerifyProgressEventArgs : CacheProgressBaseEventArgs |
| 1462 | { | 1359 | { |
| 1360 | /// <summary /> | ||
| 1361 | public CacheVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, CacheVerifyStep verifyStep, bool cancelRecommendation) | ||
| 1362 | : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) | ||
| 1363 | { | ||
| 1364 | this.Step = verifyStep; | ||
| 1365 | } | ||
| 1366 | |||
| 1463 | /// <summary> | 1367 | /// <summary> |
| 1464 | /// Creates a new instance of the <see cref="CacheVerifyCompleteEventArgs"/> class. | 1368 | /// Gets the current verification step. |
| 1465 | /// </summary> | 1369 | /// </summary> |
| 1466 | public CacheVerifyCompleteEventArgs(string packageId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) | 1370 | public CacheVerifyStep Step { get; private set; } |
| 1371 | } | ||
| 1372 | |||
| 1373 | /// <summary> | ||
| 1374 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.CacheVerifyComplete"/> | ||
| 1375 | /// </summary> | ||
| 1376 | [Serializable] | ||
| 1377 | public class CacheVerifyCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION> | ||
| 1378 | { | ||
| 1379 | /// <summary /> | ||
| 1380 | public CacheVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) | ||
| 1467 | : base(hrStatus, recommendation, action) | 1381 | : base(hrStatus, recommendation, action) |
| 1468 | { | 1382 | { |
| 1469 | this.PackageId = packageId; | 1383 | this.PackageOrContainerId = packageOrContainerId; |
| 1470 | this.PayloadId = payloadId; | 1384 | this.PayloadId = payloadId; |
| 1471 | } | 1385 | } |
| 1472 | 1386 | ||
| 1473 | /// <summary> | 1387 | /// <summary> |
| 1474 | /// Gets the identifier of the package. | 1388 | /// Gets the identifier of the container or package. |
| 1475 | /// </summary> | 1389 | /// </summary> |
| 1476 | public string PackageId { get; private set; } | 1390 | public string PackageOrContainerId { get; private set; } |
| 1477 | 1391 | ||
| 1478 | /// <summary> | 1392 | /// <summary> |
| 1479 | /// Gets the identifier of the payload. | 1393 | /// Gets the identifier of the payload. |
| @@ -1498,16 +1412,12 @@ namespace WixToolset.Mba.Core | |||
| 1498 | } | 1412 | } |
| 1499 | 1413 | ||
| 1500 | /// <summary> | 1414 | /// <summary> |
| 1501 | /// Additional arguments used when the engine has begun installing packages. | 1415 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteBegin"/> |
| 1502 | /// </summary> | 1416 | /// </summary> |
| 1503 | [Serializable] | 1417 | [Serializable] |
| 1504 | public class ExecuteBeginEventArgs : CancellableHResultEventArgs | 1418 | public class ExecuteBeginEventArgs : CancellableHResultEventArgs |
| 1505 | { | 1419 | { |
| 1506 | /// <summary> | 1420 | /// <summary /> |
| 1507 | /// Creates a new instance of the <see cref="ExecuteBeginEventArgs"/> class. | ||
| 1508 | /// </summary> | ||
| 1509 | /// <param name="packageCount">The number of packages to act on.</param> | ||
| 1510 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1511 | public ExecuteBeginEventArgs(int packageCount, bool cancelRecommendation) | 1421 | public ExecuteBeginEventArgs(int packageCount, bool cancelRecommendation) |
| 1512 | : base(cancelRecommendation) | 1422 | : base(cancelRecommendation) |
| 1513 | { | 1423 | { |
| @@ -1521,20 +1431,12 @@ namespace WixToolset.Mba.Core | |||
| 1521 | } | 1431 | } |
| 1522 | 1432 | ||
| 1523 | /// <summary> | 1433 | /// <summary> |
| 1524 | /// Additional arguments used when the engine has begun installing a specific package. | 1434 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecutePackageBegin"/> |
| 1525 | /// </summary> | 1435 | /// </summary> |
| 1526 | [Serializable] | 1436 | [Serializable] |
| 1527 | public class ExecutePackageBeginEventArgs : CancellableHResultEventArgs | 1437 | public class ExecutePackageBeginEventArgs : CancellableHResultEventArgs |
| 1528 | { | 1438 | { |
| 1529 | /// <summary> | 1439 | /// <summary /> |
| 1530 | /// Creates a new instance of the <see cref="ExecutePackageBeginEventArgs"/> class. | ||
| 1531 | /// </summary> | ||
| 1532 | /// <param name="packageId">The identity of the package to act on.</param> | ||
| 1533 | /// <param name="shouldExecute">Whether the package is being executed or rolled back.</param> | ||
| 1534 | /// <param name="action">The action about to be executed.</param> | ||
| 1535 | /// <param name="uiLevel">The internal UI level (if this is an MSI or MSP package).</param> | ||
| 1536 | /// <param name="disableExternalUiHandler">Whether Burn will set up an external UI handler (if this is an MSI or MSP package).</param> | ||
| 1537 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1538 | public ExecutePackageBeginEventArgs(string packageId, bool shouldExecute, ActionState action, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, bool cancelRecommendation) | 1440 | public ExecutePackageBeginEventArgs(string packageId, bool shouldExecute, ActionState action, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, bool cancelRecommendation) |
| 1539 | : base(cancelRecommendation) | 1441 | : base(cancelRecommendation) |
| 1540 | { | 1442 | { |
| @@ -1572,17 +1474,12 @@ namespace WixToolset.Mba.Core | |||
| 1572 | } | 1474 | } |
| 1573 | 1475 | ||
| 1574 | /// <summary> | 1476 | /// <summary> |
| 1575 | /// Additional arguments used when the engine executes one or more patches targeting a product. | 1477 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecutePatchTarget"/> |
| 1576 | /// </summary> | 1478 | /// </summary> |
| 1577 | [Serializable] | 1479 | [Serializable] |
| 1578 | public class ExecutePatchTargetEventArgs : CancellableHResultEventArgs | 1480 | public class ExecutePatchTargetEventArgs : CancellableHResultEventArgs |
| 1579 | { | 1481 | { |
| 1580 | /// <summary> | 1482 | /// <summary /> |
| 1581 | /// Creates a new instance of the <see cref="ExecutePatchTargetEventArgs"/> class. | ||
| 1582 | /// </summary> | ||
| 1583 | /// <param name="packageId">The identity of the package to act on.</param> | ||
| 1584 | /// <param name="targetProductCode">The product code of the target of the patch.</param> | ||
| 1585 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1586 | public ExecutePatchTargetEventArgs(string packageId, string targetProductCode, bool cancelRecommendation) | 1483 | public ExecutePatchTargetEventArgs(string packageId, string targetProductCode, bool cancelRecommendation) |
| 1587 | : base(cancelRecommendation) | 1484 | : base(cancelRecommendation) |
| 1588 | { | 1485 | { |
| @@ -1602,21 +1499,12 @@ namespace WixToolset.Mba.Core | |||
| 1602 | } | 1499 | } |
| 1603 | 1500 | ||
| 1604 | /// <summary> | 1501 | /// <summary> |
| 1605 | /// Additional arguments used when Windows Installer sends an installation message. | 1502 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteMsiMessage"/> |
| 1606 | /// </summary> | 1503 | /// </summary> |
| 1607 | [Serializable] | 1504 | [Serializable] |
| 1608 | public class ExecuteMsiMessageEventArgs : ResultEventArgs | 1505 | public class ExecuteMsiMessageEventArgs : ResultEventArgs |
| 1609 | { | 1506 | { |
| 1610 | /// <summary> | 1507 | /// <summary /> |
| 1611 | /// Creates a new instance of the <see cref="ExecuteMsiMessageEventArgs"/> class. | ||
| 1612 | /// </summary> | ||
| 1613 | /// <param name="packageId">The identity of the package that yielded this message.</param> | ||
| 1614 | /// <param name="messageType">The type of this message.</param> | ||
| 1615 | /// <param name="dwUIHint">Recommended display flags for this message.</param> | ||
| 1616 | /// <param name="message">The message.</param> | ||
| 1617 | /// <param name="data">The extended data for the message.</param> | ||
| 1618 | /// <param name="recommendation">Recommended result from engine.</param> | ||
| 1619 | /// <param name="result">The result to return to the engine.</param> | ||
| 1620 | public ExecuteMsiMessageEventArgs(string packageId, InstallMessage messageType, int dwUIHint, string message, string[] data, Result recommendation, Result result) | 1508 | public ExecuteMsiMessageEventArgs(string packageId, InstallMessage messageType, int dwUIHint, string message, string[] data, Result recommendation, Result result) |
| 1621 | : base(recommendation, result) | 1509 | : base(recommendation, result) |
| 1622 | { | 1510 | { |
| @@ -1654,18 +1542,12 @@ namespace WixToolset.Mba.Core | |||
| 1654 | } | 1542 | } |
| 1655 | 1543 | ||
| 1656 | /// <summary> | 1544 | /// <summary> |
| 1657 | /// Additional arugments used for file in use installation messages. | 1545 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteFilesInUse"/> |
| 1658 | /// </summary> | 1546 | /// </summary> |
| 1659 | [Serializable] | 1547 | [Serializable] |
| 1660 | public class ExecuteFilesInUseEventArgs : ResultEventArgs | 1548 | public class ExecuteFilesInUseEventArgs : ResultEventArgs |
| 1661 | { | 1549 | { |
| 1662 | /// <summary> | 1550 | /// <summary /> |
| 1663 | /// Creates a new instance of the <see cref="ExecuteFilesInUseEventArgs"/> class. | ||
| 1664 | /// </summary> | ||
| 1665 | /// <param name="packageId">The identity of the package that yielded the files in use message.</param> | ||
| 1666 | /// <param name="files">The list of files in use.</param> | ||
| 1667 | /// <param name="recommendation">Recommended result from engine.</param> | ||
| 1668 | /// <param name="result">The result to return to the engine.</param> | ||
| 1669 | public ExecuteFilesInUseEventArgs(string packageId, string[] files, Result recommendation, Result result) | 1551 | public ExecuteFilesInUseEventArgs(string packageId, string[] files, Result recommendation, Result result) |
| 1670 | : base(recommendation, result) | 1552 | : base(recommendation, result) |
| 1671 | { | 1553 | { |
| @@ -1685,19 +1567,13 @@ namespace WixToolset.Mba.Core | |||
| 1685 | } | 1567 | } |
| 1686 | 1568 | ||
| 1687 | /// <summary> | 1569 | /// <summary> |
| 1570 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecutePackageComplete"/> | ||
| 1688 | /// Additional arguments used when the engine has completed installing a specific package. | 1571 | /// Additional arguments used when the engine has completed installing a specific package. |
| 1689 | /// </summary> | 1572 | /// </summary> |
| 1690 | [Serializable] | 1573 | [Serializable] |
| 1691 | public class ExecutePackageCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION> | 1574 | public class ExecutePackageCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION> |
| 1692 | { | 1575 | { |
| 1693 | /// <summary> | 1576 | /// <summary /> |
| 1694 | /// Creates a new instance of the <see cref="ExecutePackageCompleteEventArgs"/> class. | ||
| 1695 | /// </summary> | ||
| 1696 | /// <param name="packageId">The identity of the package that was acted on.</param> | ||
| 1697 | /// <param name="hrStatus">The return code of the operation.</param> | ||
| 1698 | /// <param name="restart">Whether a restart is required.</param> | ||
| 1699 | /// <param name="recommendation">Recommended action from engine.</param> | ||
| 1700 | /// <param name="action">The action to perform.</param> | ||
| 1701 | public ExecutePackageCompleteEventArgs(string packageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action) | 1577 | public ExecutePackageCompleteEventArgs(string packageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action) |
| 1702 | : base(hrStatus, recommendation, action) | 1578 | : base(hrStatus, recommendation, action) |
| 1703 | { | 1579 | { |
| @@ -1733,18 +1609,12 @@ namespace WixToolset.Mba.Core | |||
| 1733 | } | 1609 | } |
| 1734 | 1610 | ||
| 1735 | /// <summary> | 1611 | /// <summary> |
| 1736 | /// Additional arguments used when the engine has completed installing the bundle. | 1612 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ApplyComplete"/> |
| 1737 | /// </summary> | 1613 | /// </summary> |
| 1738 | [Serializable] | 1614 | [Serializable] |
| 1739 | public class ApplyCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_APPLYCOMPLETE_ACTION> | 1615 | public class ApplyCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_APPLYCOMPLETE_ACTION> |
| 1740 | { | 1616 | { |
| 1741 | /// <summary> | 1617 | /// <summary /> |
| 1742 | /// Creates a new instance of the <see cref="ApplyCompleteEventArgs"/> clas. | ||
| 1743 | /// </summary> | ||
| 1744 | /// <param name="hrStatus">The return code of the operation.</param> | ||
| 1745 | /// <param name="restart">Whether a restart is required.</param> | ||
| 1746 | /// <param name="recommendation">Recommended action from engine.</param> | ||
| 1747 | /// <param name="action">The action to perform.</param> | ||
| 1748 | public ApplyCompleteEventArgs(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_APPLYCOMPLETE_ACTION action) | 1618 | public ApplyCompleteEventArgs(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_APPLYCOMPLETE_ACTION action) |
| 1749 | : base(hrStatus, recommendation, action) | 1619 | : base(hrStatus, recommendation, action) |
| 1750 | { | 1620 | { |
| @@ -1819,18 +1689,12 @@ namespace WixToolset.Mba.Core | |||
| 1819 | } | 1689 | } |
| 1820 | 1690 | ||
| 1821 | /// <summary> | 1691 | /// <summary> |
| 1822 | /// Additional arguments used by the engine when it has begun caching a specific package. | 1692 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.CachePackageBegin"/> |
| 1823 | /// </summary> | 1693 | /// </summary> |
| 1824 | [Serializable] | 1694 | [Serializable] |
| 1825 | public class CachePackageBeginEventArgs : CancellableHResultEventArgs | 1695 | public class CachePackageBeginEventArgs : CancellableHResultEventArgs |
| 1826 | { | 1696 | { |
| 1827 | /// <summary> | 1697 | /// <summary /> |
| 1828 | /// Creates a new instance of the <see cref="CachePackageBeginEventArgs"/> class. | ||
| 1829 | /// </summary> | ||
| 1830 | /// <param name="packageId">The identity of the package that is being cached.</param> | ||
| 1831 | /// <param name="cachePayloads">Number of payloads to be cached.</param> | ||
| 1832 | /// <param name="packageCacheSize">The size on disk required by the specific package.</param> | ||
| 1833 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1834 | public CachePackageBeginEventArgs(string packageId, int cachePayloads, long packageCacheSize, bool cancelRecommendation) | 1698 | public CachePackageBeginEventArgs(string packageId, int cachePayloads, long packageCacheSize, bool cancelRecommendation) |
| 1835 | : base(cancelRecommendation) | 1699 | : base(cancelRecommendation) |
| 1836 | { | 1700 | { |
| @@ -1856,18 +1720,12 @@ namespace WixToolset.Mba.Core | |||
| 1856 | } | 1720 | } |
| 1857 | 1721 | ||
| 1858 | /// <summary> | 1722 | /// <summary> |
| 1859 | /// Additional arguments passed by the engine when it has completed caching a specific package. | 1723 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.CachePackageComplete"/> |
| 1860 | /// </summary> | 1724 | /// </summary> |
| 1861 | [Serializable] | 1725 | [Serializable] |
| 1862 | public class CachePackageCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION> | 1726 | public class CachePackageCompleteEventArgs : ActionEventArgs<BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION> |
| 1863 | { | 1727 | { |
| 1864 | /// <summary> | 1728 | /// <summary /> |
| 1865 | /// Creates a new instance of the <see cref="CachePackageCompleteEventArgs"/> class. | ||
| 1866 | /// </summary> | ||
| 1867 | /// <param name="packageId">The identity of the package that was cached.</param> | ||
| 1868 | /// <param name="hrStatus">The return code of the operation.</param> | ||
| 1869 | /// <param name="recommendation">Recommended action from engine.</param> | ||
| 1870 | /// <param name="action">The action to perform.</param> | ||
| 1871 | public CachePackageCompleteEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) | 1729 | public CachePackageCompleteEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) |
| 1872 | : base(hrStatus, recommendation, action) | 1730 | : base(hrStatus, recommendation, action) |
| 1873 | { | 1731 | { |
| @@ -1881,18 +1739,12 @@ namespace WixToolset.Mba.Core | |||
| 1881 | } | 1739 | } |
| 1882 | 1740 | ||
| 1883 | /// <summary> | 1741 | /// <summary> |
| 1884 | /// Additional arguments passed by the engine while executing on payload. | 1742 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.ExecuteProgress"/> |
| 1885 | /// </summary> | 1743 | /// </summary> |
| 1886 | [Serializable] | 1744 | [Serializable] |
| 1887 | public class ExecuteProgressEventArgs : CancellableHResultEventArgs | 1745 | public class ExecuteProgressEventArgs : CancellableHResultEventArgs |
| 1888 | { | 1746 | { |
| 1889 | /// <summary> | 1747 | /// <summary /> |
| 1890 | /// Creates a new instance of the <see cref="ExecuteProgressEventArgs"/> class. | ||
| 1891 | /// </summary> | ||
| 1892 | /// <param name="packageId">The identifier of the package being executed.</param> | ||
| 1893 | /// <param name="progressPercentage">The percentage from 0 to 100 of the execution progress for a single payload.</param> | ||
| 1894 | /// <param name="overallPercentage">The percentage from 0 to 100 of the execution progress for all payload.</param> | ||
| 1895 | /// <param name="cancelRecommendation">The recommendation from the engine.</param> | ||
| 1896 | public ExecuteProgressEventArgs(string packageId, int progressPercentage, int overallPercentage, bool cancelRecommendation) | 1748 | public ExecuteProgressEventArgs(string packageId, int progressPercentage, int overallPercentage, bool cancelRecommendation) |
| 1897 | : base(cancelRecommendation) | 1749 | : base(cancelRecommendation) |
| 1898 | { | 1750 | { |
| @@ -2187,4 +2039,130 @@ namespace WixToolset.Mba.Core | |||
| 2187 | { | 2039 | { |
| 2188 | } | 2040 | } |
| 2189 | } | 2041 | } |
| 2042 | |||
| 2043 | /// <summary> | ||
| 2044 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyBegin"/>. | ||
| 2045 | /// </summary> | ||
| 2046 | [Serializable] | ||
| 2047 | public class CacheContainerOrPayloadVerifyBeginEventArgs : CancellableHResultEventArgs | ||
| 2048 | { | ||
| 2049 | /// <summary /> | ||
| 2050 | public CacheContainerOrPayloadVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) | ||
| 2051 | : base(cancelRecommendation) | ||
| 2052 | { | ||
| 2053 | this.PackageOrContainerId = packageOrContainerId; | ||
| 2054 | this.PayloadId = payloadId; | ||
| 2055 | } | ||
| 2056 | |||
| 2057 | /// <summary> | ||
| 2058 | /// Gets the identifier of the container or package. | ||
| 2059 | /// </summary> | ||
| 2060 | public string PackageOrContainerId { get; private set; } | ||
| 2061 | |||
| 2062 | /// <summary> | ||
| 2063 | /// Gets the identifier of the payload. | ||
| 2064 | /// </summary> | ||
| 2065 | public string PayloadId { get; private set; } | ||
| 2066 | } | ||
| 2067 | |||
| 2068 | /// <summary> | ||
| 2069 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyProgress"/>. | ||
| 2070 | /// </summary> | ||
| 2071 | [Serializable] | ||
| 2072 | public class CacheContainerOrPayloadVerifyProgressEventArgs : CacheProgressBaseEventArgs | ||
| 2073 | { | ||
| 2074 | /// <summary /> | ||
| 2075 | public CacheContainerOrPayloadVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) | ||
| 2076 | : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) | ||
| 2077 | { | ||
| 2078 | } | ||
| 2079 | } | ||
| 2080 | |||
| 2081 | /// <summary> | ||
| 2082 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyComplete"/> | ||
| 2083 | /// </summary> | ||
| 2084 | [Serializable] | ||
| 2085 | public class CacheContainerOrPayloadVerifyCompleteEventArgs : StatusEventArgs | ||
| 2086 | { | ||
| 2087 | /// <summary /> | ||
| 2088 | public CacheContainerOrPayloadVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus) | ||
| 2089 | : base(hrStatus) | ||
| 2090 | { | ||
| 2091 | this.PackageOrContainerId = packageOrContainerId; | ||
| 2092 | this.PayloadId = payloadId; | ||
| 2093 | } | ||
| 2094 | |||
| 2095 | /// <summary> | ||
| 2096 | /// Gets the identifier of the container or package. | ||
| 2097 | /// </summary> | ||
| 2098 | public string PackageOrContainerId { get; private set; } | ||
| 2099 | |||
| 2100 | /// <summary> | ||
| 2101 | /// Gets the identifier of the payload. | ||
| 2102 | /// </summary> | ||
| 2103 | public string PayloadId { get; private set; } | ||
| 2104 | } | ||
| 2105 | |||
| 2106 | /// <summary> | ||
| 2107 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CachePayloadExtractBegin"/>. | ||
| 2108 | /// </summary> | ||
| 2109 | [Serializable] | ||
| 2110 | public class CachePayloadExtractBeginEventArgs : CancellableHResultEventArgs | ||
| 2111 | { | ||
| 2112 | /// <summary /> | ||
| 2113 | public CachePayloadExtractBeginEventArgs(string containerId, string payloadId, bool cancelRecommendation) | ||
| 2114 | : base(cancelRecommendation) | ||
| 2115 | { | ||
| 2116 | this.ContainerId = containerId; | ||
| 2117 | this.PayloadId = payloadId; | ||
| 2118 | } | ||
| 2119 | |||
| 2120 | /// <summary> | ||
| 2121 | /// Gets the identifier of the container. | ||
| 2122 | /// </summary> | ||
| 2123 | public string ContainerId { get; private set; } | ||
| 2124 | |||
| 2125 | /// <summary> | ||
| 2126 | /// Gets the identifier of the payload. | ||
| 2127 | /// </summary> | ||
| 2128 | public string PayloadId { get; private set; } | ||
| 2129 | } | ||
| 2130 | |||
| 2131 | /// <summary> | ||
| 2132 | /// EventArgs for <see cref="IDefaultBootstrapperApplication.CachePayloadExtractProgress"/>. | ||
| 2133 | /// </summary> | ||
| 2134 | [Serializable] | ||
| 2135 | public class CachePayloadExtractProgressEventArgs : CacheProgressBaseEventArgs | ||
| 2136 | { | ||
| 2137 | /// <summary /> | ||
| 2138 | public CachePayloadExtractProgressEventArgs(string containerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) | ||
| 2139 | : base(containerId, payloadId, progress, total, overallPercentage, cancelRecommendation) | ||
| 2140 | { | ||
| 2141 | } | ||
| 2142 | } | ||
| 2143 | |||
| 2144 | /// <summary> | ||
| 2145 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.CachePayloadExtractComplete"/> | ||
| 2146 | /// </summary> | ||
| 2147 | [Serializable] | ||
| 2148 | public class CachePayloadExtractCompleteEventArgs : StatusEventArgs | ||
| 2149 | { | ||
| 2150 | /// <summary /> | ||
| 2151 | public CachePayloadExtractCompleteEventArgs(string containerId, string payloadId, int hrStatus) | ||
| 2152 | : base(hrStatus) | ||
| 2153 | { | ||
| 2154 | this.ContainerId = containerId; | ||
| 2155 | this.PayloadId = payloadId; | ||
| 2156 | } | ||
| 2157 | |||
| 2158 | /// <summary> | ||
| 2159 | /// Gets the identifier of the container. | ||
| 2160 | /// </summary> | ||
| 2161 | public string ContainerId { get; private set; } | ||
| 2162 | |||
| 2163 | /// <summary> | ||
| 2164 | /// Gets the identifier of the payload. | ||
| 2165 | /// </summary> | ||
| 2166 | public string PayloadId { get; private set; } | ||
| 2167 | } | ||
| 2190 | } | 2168 | } |
diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs index 88c65674..2195fd4b 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | namespace WixToolset.Mba.Core | 3 | namespace WixToolset.Mba.Core |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.CodeDom.Compiler; | ||
| 7 | using System.Runtime.InteropServices; | 6 | using System.Runtime.InteropServices; |
| 8 | 7 | ||
| 9 | /// <summary> | 8 | /// <summary> |
| @@ -15,6 +14,29 @@ namespace WixToolset.Mba.Core | |||
| 15 | public interface IBootstrapperApplication | 14 | public interface IBootstrapperApplication |
| 16 | { | 15 | { |
| 17 | /// <summary> | 16 | /// <summary> |
| 17 | /// Low level method that is called directly from the engine. | ||
| 18 | /// </summary> | ||
| 19 | [PreserveSig] | ||
| 20 | [return: MarshalAs(UnmanagedType.I4)] | ||
| 21 | int BAProc( | ||
| 22 | int message, | ||
| 23 | IntPtr pvArgs, | ||
| 24 | IntPtr pvResults, | ||
| 25 | IntPtr pvContext | ||
| 26 | ); | ||
| 27 | |||
| 28 | /// <summary> | ||
| 29 | /// Low level method that is called directly from the engine. | ||
| 30 | /// </summary> | ||
| 31 | void BAProcFallback( | ||
| 32 | int message, | ||
| 33 | IntPtr pvArgs, | ||
| 34 | IntPtr pvResults, | ||
| 35 | ref int phr, | ||
| 36 | IntPtr pvContext | ||
| 37 | ); | ||
| 38 | |||
| 39 | /// <summary> | ||
| 18 | /// See <see cref="IDefaultBootstrapperApplication.Startup"/>. | 40 | /// See <see cref="IDefaultBootstrapperApplication.Startup"/>. |
| 19 | /// </summary> | 41 | /// </summary> |
| 20 | [PreserveSig] | 42 | [PreserveSig] |
| @@ -600,31 +622,36 @@ namespace WixToolset.Mba.Core | |||
| 600 | /// <summary> | 622 | /// <summary> |
| 601 | /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyBegin"/>. | 623 | /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyBegin"/>. |
| 602 | /// </summary> | 624 | /// </summary> |
| 603 | /// <param name="wzPackageId"></param> | ||
| 604 | /// <param name="wzPayloadId"></param> | ||
| 605 | /// <param name="fCancel"></param> | ||
| 606 | /// <returns></returns> | ||
| 607 | [PreserveSig] | 625 | [PreserveSig] |
| 608 | [return: MarshalAs(UnmanagedType.I4)] | 626 | [return: MarshalAs(UnmanagedType.I4)] |
| 609 | int OnCacheVerifyBegin( | 627 | int OnCacheVerifyBegin( |
| 610 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | 628 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, |
| 611 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | 629 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, |
| 612 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | 630 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel |
| 613 | ); | 631 | ); |
| 614 | 632 | ||
| 615 | /// <summary> | 633 | /// <summary> |
| 634 | /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyProgress"/>. | ||
| 635 | /// </summary> | ||
| 636 | [PreserveSig] | ||
| 637 | [return: MarshalAs(UnmanagedType.I4)] | ||
| 638 | int OnCacheVerifyProgress( | ||
| 639 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
| 640 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
| 641 | [MarshalAs(UnmanagedType.U8)] long dw64Progress, | ||
| 642 | [MarshalAs(UnmanagedType.U8)] long dw64Total, | ||
| 643 | [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, | ||
| 644 | [MarshalAs(UnmanagedType.I4)] CacheVerifyStep verifyStep, | ||
| 645 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
| 646 | ); | ||
| 647 | |||
| 648 | /// <summary> | ||
| 616 | /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyComplete"/>. | 649 | /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyComplete"/>. |
| 617 | /// </summary> | 650 | /// </summary> |
| 618 | /// <param name="wzPackageId"></param> | ||
| 619 | /// <param name="wzPayloadId"></param> | ||
| 620 | /// <param name="hrStatus"></param> | ||
| 621 | /// <param name="recommendation"></param> | ||
| 622 | /// <param name="action"></param> | ||
| 623 | /// <returns></returns> | ||
| 624 | [PreserveSig] | 651 | [PreserveSig] |
| 625 | [return: MarshalAs(UnmanagedType.I4)] | 652 | [return: MarshalAs(UnmanagedType.I4)] |
| 626 | int OnCacheVerifyComplete( | 653 | int OnCacheVerifyComplete( |
| 627 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | 654 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, |
| 628 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | 655 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, |
| 629 | int hrStatus, | 656 | int hrStatus, |
| 630 | BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, | 657 | BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, |
| @@ -1006,36 +1033,75 @@ namespace WixToolset.Mba.Core | |||
| 1006 | ); | 1033 | ); |
| 1007 | 1034 | ||
| 1008 | /// <summary> | 1035 | /// <summary> |
| 1009 | /// Low level method that is called directly from the engine. | 1036 | /// See <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyBegin"/>. |
| 1010 | /// </summary> | 1037 | /// </summary> |
| 1011 | /// <param name="message"></param> | ||
| 1012 | /// <param name="pvArgs"></param> | ||
| 1013 | /// <param name="pvResults"></param> | ||
| 1014 | /// <param name="pvContext"></param> | ||
| 1015 | /// <returns></returns> | ||
| 1016 | [PreserveSig] | 1038 | [PreserveSig] |
| 1017 | [return: MarshalAs(UnmanagedType.I4)] | 1039 | [return: MarshalAs(UnmanagedType.I4)] |
| 1018 | int BAProc( | 1040 | int OnCacheContainerOrPayloadVerifyBegin( |
| 1019 | int message, | 1041 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, |
| 1020 | IntPtr pvArgs, | 1042 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, |
| 1021 | IntPtr pvResults, | 1043 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel |
| 1022 | IntPtr pvContext | ||
| 1023 | ); | 1044 | ); |
| 1024 | 1045 | ||
| 1025 | /// <summary> | 1046 | /// <summary> |
| 1026 | /// Low level method that is called directly from the engine. | 1047 | /// See <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyProgress"/>. |
| 1027 | /// </summary> | 1048 | /// </summary> |
| 1028 | /// <param name="message"></param> | 1049 | [PreserveSig] |
| 1029 | /// <param name="pvArgs"></param> | 1050 | [return: MarshalAs(UnmanagedType.I4)] |
| 1030 | /// <param name="pvResults"></param> | 1051 | int OnCacheContainerOrPayloadVerifyProgress( |
| 1031 | /// <param name="phr"></param> | 1052 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, |
| 1032 | /// <param name="pvContext"></param> | 1053 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, |
| 1033 | void BAProcFallback( | 1054 | [MarshalAs(UnmanagedType.U8)] long dw64Progress, |
| 1034 | int message, | 1055 | [MarshalAs(UnmanagedType.U8)] long dw64Total, |
| 1035 | IntPtr pvArgs, | 1056 | [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, |
| 1036 | IntPtr pvResults, | 1057 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel |
| 1037 | ref int phr, | 1058 | ); |
| 1038 | IntPtr pvContext | 1059 | |
| 1060 | /// <summary> | ||
| 1061 | /// See <see cref="IDefaultBootstrapperApplication.CacheContainerOrPayloadVerifyComplete"/>. | ||
| 1062 | /// </summary> | ||
| 1063 | [PreserveSig] | ||
| 1064 | [return: MarshalAs(UnmanagedType.I4)] | ||
| 1065 | int OnCacheContainerOrPayloadVerifyComplete( | ||
| 1066 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
| 1067 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
| 1068 | int hrStatus | ||
| 1069 | ); | ||
| 1070 | |||
| 1071 | /// <summary> | ||
| 1072 | /// See <see cref="IDefaultBootstrapperApplication.CachePayloadExtractBegin"/>. | ||
| 1073 | /// </summary> | ||
| 1074 | [PreserveSig] | ||
| 1075 | [return: MarshalAs(UnmanagedType.I4)] | ||
| 1076 | int OnCachePayloadExtractBegin( | ||
| 1077 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
| 1078 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
| 1079 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
| 1080 | ); | ||
| 1081 | |||
| 1082 | /// <summary> | ||
| 1083 | /// See <see cref="IDefaultBootstrapperApplication.CachePayloadExtractProgress"/>. | ||
| 1084 | /// </summary> | ||
| 1085 | [PreserveSig] | ||
| 1086 | [return: MarshalAs(UnmanagedType.I4)] | ||
| 1087 | int OnCachePayloadExtractProgress( | ||
| 1088 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
| 1089 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
| 1090 | [MarshalAs(UnmanagedType.U8)] long dw64Progress, | ||
| 1091 | [MarshalAs(UnmanagedType.U8)] long dw64Total, | ||
| 1092 | [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, | ||
| 1093 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
| 1094 | ); | ||
| 1095 | |||
| 1096 | /// <summary> | ||
| 1097 | /// See <see cref="IDefaultBootstrapperApplication.CachePayloadExtractComplete"/>. | ||
| 1098 | /// </summary> | ||
| 1099 | [PreserveSig] | ||
| 1100 | [return: MarshalAs(UnmanagedType.I4)] | ||
| 1101 | int OnCachePayloadExtractComplete( | ||
| 1102 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
| 1103 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
| 1104 | int hrStatus | ||
| 1039 | ); | 1105 | ); |
| 1040 | } | 1106 | } |
| 1041 | 1107 | ||
| @@ -1449,6 +1515,26 @@ namespace WixToolset.Mba.Core | |||
| 1449 | } | 1515 | } |
| 1450 | 1516 | ||
| 1451 | /// <summary> | 1517 | /// <summary> |
| 1518 | /// The current step when verifying a container or payload. | ||
| 1519 | /// </summary> | ||
| 1520 | public enum CacheVerifyStep | ||
| 1521 | { | ||
| 1522 | /// <summary> | ||
| 1523 | /// Copying or moving the file from the working path to the unverified path. | ||
| 1524 | /// Not used during Layout. | ||
| 1525 | /// </summary> | ||
| 1526 | Stage, | ||
| 1527 | /// <summary> | ||
| 1528 | /// Hashing the file. | ||
| 1529 | /// </summary> | ||
| 1530 | Hash, | ||
| 1531 | /// <summary> | ||
| 1532 | /// Copying or moving the file to the final location. | ||
| 1533 | /// </summary> | ||
| 1534 | Finalize, | ||
| 1535 | } | ||
| 1536 | |||
| 1537 | /// <summary> | ||
| 1452 | /// The restart state after a package or all packages were applied. | 1538 | /// The restart state after a package or all packages were applied. |
| 1453 | /// </summary> | 1539 | /// </summary> |
| 1454 | public enum ApplyRestart | 1540 | public enum ApplyRestart |
| @@ -1566,7 +1652,7 @@ namespace WixToolset.Mba.Core | |||
| 1566 | None, | 1652 | None, |
| 1567 | 1653 | ||
| 1568 | /// <summary> | 1654 | /// <summary> |
| 1569 | /// Instructs the engine to try the acquisition of the package again. | 1655 | /// Instructs the engine to try the acquisition of the payload again. |
| 1570 | /// Ignored if hrStatus is a success. | 1656 | /// Ignored if hrStatus is a success. |
| 1571 | /// </summary> | 1657 | /// </summary> |
| 1572 | Retry, | 1658 | Retry, |
diff --git a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index 03f94d37..a295f6c0 100644 --- a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | |||
| @@ -44,7 +44,7 @@ namespace WixToolset.Mba.Core | |||
| 44 | event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; | 44 | event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete; |
| 45 | 45 | ||
| 46 | /// <summary> | 46 | /// <summary> |
| 47 | /// Fired when the engine has progress acquiring the installation sources. | 47 | /// Fired when the engine has progress acquiring the payload or container. |
| 48 | /// </summary> | 48 | /// </summary> |
| 49 | event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress; | 49 | event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress; |
| 50 | 50 | ||
| @@ -64,6 +64,21 @@ namespace WixToolset.Mba.Core | |||
| 64 | event EventHandler<CacheCompleteEventArgs> CacheComplete; | 64 | event EventHandler<CacheCompleteEventArgs> CacheComplete; |
| 65 | 65 | ||
| 66 | /// <summary> | 66 | /// <summary> |
| 67 | /// Fired when the engine begins the verification of the payload or container that was already in the package cache. | ||
| 68 | /// </summary> | ||
| 69 | event EventHandler<CacheContainerOrPayloadVerifyBeginEventArgs> CacheContainerOrPayloadVerifyBegin; | ||
| 70 | |||
| 71 | /// <summary> | ||
| 72 | /// Fired when the engine has completed the verification of the payload or container that was already in the package cache. | ||
| 73 | /// </summary> | ||
| 74 | event EventHandler<CacheContainerOrPayloadVerifyCompleteEventArgs> CacheContainerOrPayloadVerifyComplete; | ||
| 75 | |||
| 76 | /// <summary> | ||
| 77 | /// Fired when the engine has progress verifying the payload or container that was already in the package cache. | ||
| 78 | /// </summary> | ||
| 79 | event EventHandler<CacheContainerOrPayloadVerifyProgressEventArgs> CacheContainerOrPayloadVerifyProgress; | ||
| 80 | |||
| 81 | /// <summary> | ||
| 67 | /// Fired when the engine has begun caching a specific package. | 82 | /// Fired when the engine has begun caching a specific package. |
| 68 | /// </summary> | 83 | /// </summary> |
| 69 | event EventHandler<CachePackageBeginEventArgs> CachePackageBegin; | 84 | event EventHandler<CachePackageBeginEventArgs> CachePackageBegin; |
| @@ -74,16 +89,36 @@ namespace WixToolset.Mba.Core | |||
| 74 | event EventHandler<CachePackageCompleteEventArgs> CachePackageComplete; | 89 | event EventHandler<CachePackageCompleteEventArgs> CachePackageComplete; |
| 75 | 90 | ||
| 76 | /// <summary> | 91 | /// <summary> |
| 77 | /// Fired when the engine begins the verification of the acquired installation sources. | 92 | /// Fired when the engine begins the extraction of the payload from the container. |
| 93 | /// </summary> | ||
| 94 | event EventHandler<CachePayloadExtractBeginEventArgs> CachePayloadExtractBegin; | ||
| 95 | |||
| 96 | /// <summary> | ||
| 97 | /// Fired when the engine has completed the extraction of the payload from the container. | ||
| 98 | /// </summary> | ||
| 99 | event EventHandler<CachePayloadExtractCompleteEventArgs> CachePayloadExtractComplete; | ||
| 100 | |||
| 101 | /// <summary> | ||
| 102 | /// Fired when the engine has progress extracting the payload from the container. | ||
| 103 | /// </summary> | ||
| 104 | event EventHandler<CachePayloadExtractProgressEventArgs> CachePayloadExtractProgress; | ||
| 105 | |||
| 106 | /// <summary> | ||
| 107 | /// Fired when the engine begins the verification of the acquired payload or container. | ||
| 78 | /// </summary> | 108 | /// </summary> |
| 79 | event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin; | 109 | event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin; |
| 80 | 110 | ||
| 81 | /// <summary> | 111 | /// <summary> |
| 82 | /// Fired when the engine complete the verification of the acquired installation sources. | 112 | /// Fired when the engine has completed the verification of the acquired payload or container. |
| 83 | /// </summary> | 113 | /// </summary> |
| 84 | event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete; | 114 | event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete; |
| 85 | 115 | ||
| 86 | /// <summary> | 116 | /// <summary> |
| 117 | /// Fired when the engine has progress verifying the payload or container. | ||
| 118 | /// </summary> | ||
| 119 | event EventHandler<CacheVerifyProgressEventArgs> CacheVerifyProgress; | ||
| 120 | |||
| 121 | /// <summary> | ||
| 87 | /// Fired when the engine is about to commit an MSI transaction. | 122 | /// Fired when the engine is about to commit an MSI transaction. |
| 88 | /// </summary> | 123 | /// </summary> |
| 89 | event EventHandler<CommitMsiTransactionBeginEventArgs> CommitMsiTransactionBegin; | 124 | event EventHandler<CommitMsiTransactionBeginEventArgs> CommitMsiTransactionBegin; |
| @@ -179,7 +214,7 @@ namespace WixToolset.Mba.Core | |||
| 179 | event EventHandler<ExecuteCompleteEventArgs> ExecuteComplete; | 214 | event EventHandler<ExecuteCompleteEventArgs> ExecuteComplete; |
| 180 | 215 | ||
| 181 | /// <summary> | 216 | /// <summary> |
| 182 | /// Fired when Windows Installer sends a files in use installation message. | 217 | /// Fired when a package sends a files in use installation message. |
| 183 | /// </summary> | 218 | /// </summary> |
| 184 | event EventHandler<ExecuteFilesInUseEventArgs> ExecuteFilesInUse; | 219 | event EventHandler<ExecuteFilesInUseEventArgs> ExecuteFilesInUse; |
| 185 | 220 | ||
| @@ -204,7 +239,7 @@ namespace WixToolset.Mba.Core | |||
| 204 | event EventHandler<ExecutePatchTargetEventArgs> ExecutePatchTarget; | 239 | event EventHandler<ExecutePatchTargetEventArgs> ExecutePatchTarget; |
| 205 | 240 | ||
| 206 | /// <summary> | 241 | /// <summary> |
| 207 | /// Fired by the engine while executing on payload. | 242 | /// Fired by the engine while executing a package. |
| 208 | /// </summary> | 243 | /// </summary> |
| 209 | event EventHandler<ExecuteProgressEventArgs> ExecuteProgress; | 244 | event EventHandler<ExecuteProgressEventArgs> ExecuteProgress; |
| 210 | 245 | ||
