// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Mba.Core { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.InteropServices; /// /// Base class for BA classes. /// [Serializable] public abstract class HResultEventArgs : EventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public HResultEventArgs() { } /// /// Gets or sets the of the operation. This is passed back to the engine. /// public int HResult { get; set; } } /// /// Base class for cancellable BA classes. /// [Serializable] public abstract class CancellableHResultEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CancellableHResultEventArgs(bool cancelRecommendation) { this.Cancel = cancelRecommendation; } /// /// Gets or sets whether to cancel the operation. This is passed back to the engine. /// public bool Cancel { get; set; } } /// /// Base class for classes that must return a . /// [Serializable] public abstract class ResultEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ResultEventArgs(Result recommendation, Result result) { this.Recommendation = recommendation; this.Result = result; } /// /// Gets the recommended of the operation. /// public Result Recommendation { get; private set; } /// /// Gets or sets the of the operation. This is passed back to the engine. /// public Result Result { get; set; } } /// /// Base class for classes that receive status from the engine. /// [Serializable] public abstract class StatusEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public StatusEventArgs(int hrStatus) { this.Status = hrStatus; } /// /// Gets the return code of the operation. /// public int Status { get; private set; } } /// /// Base class for classes that receive status from the engine and return an action. /// public abstract class ActionEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ActionEventArgs(int hrStatus, T recommendation, T action) : base(hrStatus) { this.Recommendation = recommendation; this.Action = action; } /// /// Gets the recommended action from the engine. /// public T Recommendation { get; private set; } /// /// Gets or sets the action to be performed. This is passed back to the engine. /// public T Action { get; set; } } /// /// Base class for cancellable action BA classes. /// [Serializable] public abstract class CancellableActionEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CancellableActionEventArgs(bool cancelRecommendation, T recommendation, T action) : base(cancelRecommendation) { this.Recommendation = recommendation; this.Action = action; } /// /// Gets the recommended action from the engine. /// public T Recommendation { get; private set; } /// /// Gets or sets the action to be performed. This is passed back to the engine. /// public T Action { get; set; } } /// /// Base class for cache progress events. /// [Serializable] public abstract class CacheProgressBaseEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheProgressBaseEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; this.Progress = progress; this.Total = total; this.OverallPercentage = overallPercentage; } /// /// Gets the identifier of the container or package. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identifier of the payload. /// public string PayloadId { get; private set; } /// /// Gets the number of bytes cached thus far. /// public long Progress { get; private set; } /// /// Gets the total bytes to cache. /// public long Total { get; private set; } /// /// Gets the overall percentage of progress of caching. /// public int OverallPercentage { get; private set; } } /// /// Event arguments for . /// [Serializable] public class StartupEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public StartupEventArgs() { } } /// /// Event arguments for . /// [Serializable] public class ShutdownEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ShutdownEventArgs(BOOTSTRAPPER_SHUTDOWN_ACTION action) { this.Action = action; } /// /// The action for OnShutdown. /// public BOOTSTRAPPER_SHUTDOWN_ACTION Action { get; set; } } /// /// Event arguments for /// [Serializable] public class DetectBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectBeginEventArgs(bool cached, RegistrationType registrationType, int packageCount, bool cancelRecommendation) : base(cancelRecommendation) { this.Cached = cached; this.RegistrationType = registrationType; this.PackageCount = packageCount; } /// /// Gets whether the bundle is cached. /// public bool Cached { get; private set; } /// /// Gets the bundle's registration state. /// public RegistrationType RegistrationType { get; private set; } /// /// Gets the number of packages to detect. /// public int PackageCount { get; private set; } } /// /// Event arguments for /// [Serializable] public class DetectForwardCompatibleBundleEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) : base(cancelRecommendation) { this.BundleId = bundleId; this.RelationType = relationType; this.BundleTag = bundleTag; this.PerMachine = perMachine; this.Version = version; this.MissingFromCache = missingFromCache; } /// /// Gets the identity of the forward compatible bundle detected. /// public string BundleId { get; private set; } /// /// Gets the relationship type of the forward compatible bundle. /// public RelationType RelationType { get; private set; } /// /// Gets the tag of the forward compatible bundle. /// public string BundleTag { get; private set; } /// /// Gets whether the detected forward compatible bundle is per machine. /// public bool PerMachine { get; private set; } /// /// Gets the version of the forward compatible bundle detected. /// public string Version { get; private set; } /// /// Whether the forward compatible bundle is missing from the package cache. /// public bool MissingFromCache { get; set; } } /// /// Event arguments for /// [Serializable] public class DetectUpdateBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectUpdateBeginEventArgs(string updateLocation, bool cancelRecommendation, bool skipRecommendation) : base(cancelRecommendation) { this.UpdateLocation = updateLocation; this.Skip = skipRecommendation; } /// /// Gets the identity of the bundle to detect. /// public string UpdateLocation { get; private set; } /// /// Whether to skip checking for bundle updates. /// public bool Skip { get; set; } } /// /// Event arguments for /// [Serializable] public class DetectUpdateEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectUpdateEventArgs(string updateLocation, long size, string hash, UpdateHashType hashAlgorithm, string version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation) : base(cancelRecommendation) { this.UpdateLocation = updateLocation; this.Size = size; this.Hash = hash; this.HashAlgorithm = hashAlgorithm; this.Version = version; this.Title = title; this.Summary = summary; this.ContentType = contentType; this.Content = content; this.StopProcessingUpdates = stopRecommendation; } /// /// Gets the identity of the bundle to detect. /// public string UpdateLocation { get; private set; } /// /// Gets the size of the updated bundle. /// public long Size { get; private set; } /// /// File hash of the updated bundle. /// public string Hash { get; } /// /// The algorithm of the updated bundle's hash. /// public UpdateHashType HashAlgorithm { get; } /// /// Gets the version of the updated bundle. /// public string Version { get; private set; } /// /// Gets the title of the the updated bundle. /// public string Title { get; private set; } /// /// Gets the summary of the updated bundle. /// public string Summary { get; private set; } /// /// Gets the content type of the content of the updated bundle. /// public string ContentType { get; private set; } /// /// Gets the content of the updated bundle. /// public string Content { get; private set; } /// /// Tells the engine to stop giving the rest of the updates found in the feed. /// public bool StopProcessingUpdates { get; set; } } /// /// Event arguments for /// [Serializable] public class DetectUpdateCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectUpdateCompleteEventArgs(int hrStatus, bool ignoreRecommendation) : base(hrStatus) { this.IgnoreError = ignoreRecommendation; } /// /// If Status is an error, then set this to true to ignore it and continue detecting. /// public bool IgnoreError { get; set; } } /// /// Event arguments for /// [Serializable] public class DetectRelatedBundleEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectRelatedBundleEventArgs(string productCode, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) : base(cancelRecommendation) { this.ProductCode = productCode; this.RelationType = relationType; this.BundleTag = bundleTag; this.PerMachine = perMachine; this.Version = version; this.MissingFromCache = missingFromCache; } /// /// Gets the identity of the related bundle detected. /// public string ProductCode { get; private set; } /// /// Gets the relationship type of the related bundle. /// public RelationType RelationType { get; private set; } /// /// Gets the tag of the related package bundle. /// public string BundleTag { get; private set; } /// /// Gets whether the detected bundle is per machine. /// public bool PerMachine { get; private set; } /// /// Gets the version of the related bundle detected. /// public string Version { get; private set; } /// /// Whether the related bundle is missing from the package cache. /// public bool MissingFromCache { get; set; } } /// /// Event arguments for /// [Serializable] public class DetectPackageBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectPackageBeginEventArgs(string packageId, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; } /// /// Gets the identity of the package to detect. /// public string PackageId { get; private set; } } /// /// Event arguments for /// [Serializable] public class DetectCompatibleMsiPackageEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectCompatibleMsiPackageEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.CompatiblePackageId = compatiblePackageId; this.CompatiblePackageVersion = compatiblePackageVersion; } /// /// Gets the identity of the package that was not detected. /// public string PackageId { get; private set; } /// /// Gets the identity of the compatible package that was detected. /// public string CompatiblePackageId { get; private set; } /// /// Gets the version of the compatible package that was detected. /// public string CompatiblePackageVersion { get; private set; } } /// /// Event arguments for /// [Serializable] public class DetectRelatedMsiPackageEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.UpgradeCode = upgradeCode; this.ProductCode = productCode; this.PerMachine = perMachine; this.Version = version; this.Operation = operation; } /// /// Gets the identity of the product's package detected. /// public string PackageId { get; private set; } /// /// Gets the upgrade code of the related package detected. /// public string UpgradeCode { get; private set; } /// /// Gets the identity of the related package detected. /// public string ProductCode { get; private set; } /// /// Gets whether the detected package is per machine. /// public bool PerMachine { get; private set; } /// /// Gets the version of the related package detected. /// public string Version { get; private set; } /// /// Gets the operation that will be taken on the detected package. /// public RelatedOperation Operation { get; private set; } } /// /// Event arguments for /// public class DetectPatchTargetEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectPatchTargetEventArgs(string packageId, string productCode, PackageState state, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.ProductCode = productCode; this.State = state; } /// /// Gets the identity of the patch's package. /// public string PackageId { get; private set; } /// /// Gets the product code of the target. /// public string ProductCode { get; private set; } /// /// Gets the detected patch state for the target. /// public PackageState State { get; private set; } } /// /// Event arguments for /// public class DetectMsiFeatureEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectMsiFeatureEventArgs(string packageId, string featureId, FeatureState state, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.FeatureId = featureId; this.State = state; } /// /// Gets the identity of the feature's package detected. /// public string PackageId { get; private set; } /// /// Gets the identity of the feature detected. /// public string FeatureId { get; private set; } /// /// Gets the detected feature state. /// public FeatureState State { get; private set; } } /// /// Event arguments for . /// [Serializable] public class DetectPackageCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectPackageCompleteEventArgs(string packageId, int hrStatus, PackageState state, bool cached) : base(hrStatus) { this.PackageId = packageId; this.State = state; this.Cached = cached; } /// /// Gets the identity of the package detected. /// public string PackageId { get; private set; } /// /// Gets the state of the specified package. /// public PackageState State { get; private set; } /// /// Gets whether any part of the package is cached. /// public bool Cached { get; private set; } } /// /// Event arguments used when the detection phase has completed. /// [Serializable] public class DetectCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectCompleteEventArgs(int hrStatus, bool eligibleForCleanup) : base(hrStatus) { this.EligibleForCleanup = eligibleForCleanup; } /// /// Indicates whether the engine will uninstall the bundle if shutdown without running Apply. /// public bool EligibleForCleanup { get; private set; } } /// /// Event arguments for /// [Serializable] public class PlanBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanBeginEventArgs(int packageCount, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageCount = packageCount; } /// /// Gets the number of packages to plan for. /// public int PackageCount { get; private set; } } /// /// Event arguments for /// [Serializable] public class PlanRelatedBundleEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) : base(cancelRecommendation) { this.BundleId = bundleId; this.RecommendedState = recommendedState; this.State = state; } /// /// Gets the identity of the bundle to plan for. /// public string BundleId { get; private set; } /// /// Gets the recommended requested state for the bundle. /// public RequestState RecommendedState { get; private set; } /// /// Gets or sets the requested state for the bundle. /// public RequestState State { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanRelatedBundleTypeEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanRelatedBundleTypeEventArgs(string bundleId, RelatedBundlePlanType recommendedType, RelatedBundlePlanType type, bool cancelRecommendation) : base(cancelRecommendation) { this.BundleId = bundleId; this.RecommendedType = recommendedType; this.Type = type; } /// /// Gets the identity of the bundle to plan for. /// public string BundleId { get; private set; } /// /// Gets the recommended plan type for the bundle. /// public RelatedBundlePlanType RecommendedType { get; private set; } /// /// Gets or sets the plan type for the bundle. /// public RelatedBundlePlanType Type { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanPackageBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanPackageBeginEventArgs(string packageId, PackageState currentState, bool cached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, RequestState state, BOOTSTRAPPER_CACHE_TYPE cacheType, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.CurrentState = currentState; this.Cached = cached; this.InstallCondition = installCondition; this.RepairCondition = repairCondition; this.RecommendedState = recommendedState; this.RecommendedCacheType = recommendedCacheType; this.State = state; this.CacheType = cacheType; } /// /// Gets the identity of the package to plan for. /// public string PackageId { get; private set; } /// /// Gets the current state of the package. /// public PackageState CurrentState { get; private set; } /// /// Gets whether any part of the package is cached. /// public bool Cached { get; private set; } /// /// Gets the evaluated result of the package's install condition. /// public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT InstallCondition { get; private set; } /// /// Gets the evaluated result of the package's repair condition. /// public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT RepairCondition { get; private set; } /// /// Gets the recommended requested state for the package. /// public RequestState RecommendedState { get; private set; } /// /// The authored cache type of the package. /// public BOOTSTRAPPER_CACHE_TYPE RecommendedCacheType { get; private set; } /// /// Gets or sets the requested state for the package. /// public RequestState State { get; set; } /// /// Gets or sets the requested cache type for the package. /// public BOOTSTRAPPER_CACHE_TYPE CacheType { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanCompatibleMsiPackageBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanCompatibleMsiPackageBeginEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, bool recommendedRemove, bool requestRemove, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.CompatiblePackageId = compatiblePackageId; this.CompatiblePackageVersion = compatiblePackageVersion; this.RecommendedRemove = recommendedRemove; this.RequestRemove = requestRemove; } /// /// Gets the identity of the package that was not detected. /// public string PackageId { get; private set; } /// /// Gets the identity of the compatible package detected. /// public string CompatiblePackageId { get; private set; } /// /// Gets the version of the compatible package detected. /// public string CompatiblePackageVersion { get; private set; } /// /// Gets the recommended state to use for the compatible package for planning. /// public bool RecommendedRemove { get; private set; } /// /// Gets or sets whether to uninstall the compatible package. /// public bool RequestRemove { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanCompatibleMsiPackageCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanCompatibleMsiPackageCompleteEventArgs(string packageId, string compatiblePackageId, int hrStatus, bool requestedRemove) : base(hrStatus) { this.PackageId = packageId; this.CompatiblePackageId = compatiblePackageId; this.RequestedRemove = requestedRemove; } /// /// Gets the identity of the package planned for. /// public string PackageId { get; private set; } /// /// Gets the identity of the compatible package detected. /// public string CompatiblePackageId { get; private set; } /// /// Gets the requested state of the package. /// public bool RequestedRemove { get; private set; } } /// /// Event arguments for /// [Serializable] public class PlanRollbackBoundaryEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanRollbackBoundaryEventArgs(string rollbackBoundaryId, bool recommendedTransaction, bool transaction, bool cancelRecommendation) : base(cancelRecommendation) { this.RollbackBoundaryId = rollbackBoundaryId; this.RecommendedTransaction = recommendedTransaction; this.Transaction = transaction; } /// /// Gets the identity of the rollback boundary to plan for. /// public string RollbackBoundaryId { get; private set; } /// /// Whether or not the rollback boundary was authored to use an MSI transaction. /// public bool RecommendedTransaction { get; private set; } /// /// Whether or not an MSI transaction will be used in the rollback boundary. /// If is false, setting the value to true has no effect. /// If is true, setting the value to false will cause the packages inside this rollback boundary to be executed without a wrapping MSI transaction. /// public bool Transaction { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanPatchTargetEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanPatchTargetEventArgs(string packageId, string productCode, RequestState recommendedState, RequestState state, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.ProductCode = productCode; this.RecommendedState = recommendedState; this.State = state; } /// /// Gets the identity of the patch's package. /// public string PackageId { get; private set; } /// /// Gets the product code of the target. /// public string ProductCode { get; private set; } /// /// Gets the recommended state of the patch to use by planning for the target. /// public RequestState RecommendedState { get; private set; } /// /// Gets or sets the state of the patch to use by planning for the target. /// public RequestState State { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanMsiFeatureEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanMsiFeatureEventArgs(string packageId, string featureId, FeatureState recommendedState, FeatureState state, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.FeatureId = featureId; this.RecommendedState = recommendedState; this.State = state; } /// /// Gets the identity of the feature's package to plan. /// public string PackageId { get; private set; } /// /// Gets the identity of the feature to plan. /// public string FeatureId { get; private set; } /// /// Gets the recommended feature state to use by planning. /// public FeatureState RecommendedState { get; private set; } /// /// Gets or sets the feature state to use by planning. /// public FeatureState State { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanMsiPackageEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanMsiPackageEventArgs(string packageId, bool shouldExecute, ActionState action, BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning, bool cancelRecommendation, BURN_MSI_PROPERTY actionMsiProperty, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning) : base(cancelRecommendation) { this.PackageId = packageId; this.ShouldExecute = shouldExecute; this.Action = action; this.RecommendedFileVersioning = recommendedFileVersioning; this.ActionMsiProperty = actionMsiProperty; this.UiLevel = uiLevel; this.DisableExternalUiHandler = disableExternalUiHandler; this.FileVersioning = fileVersioning; } /// /// Gets identity of the package planned for. /// public string PackageId { get; private set; } /// /// Gets whether the package is planned to execute or roll back. /// public bool ShouldExecute { get; private set; } /// /// Gets the action planned for the package. /// public ActionState Action { get; private set; } /// /// Gets the recommended file versioning for the package. /// public BOOTSTRAPPER_MSI_FILE_VERSIONING RecommendedFileVersioning { get; private set; } /// /// Gets or sets the requested MSI property to add. /// public BURN_MSI_PROPERTY ActionMsiProperty { get; set; } /// /// Gets or sets the requested internal UI level. /// public INSTALLUILEVEL UiLevel { get; set; } /// /// Gets or sets whether Burn is requested to set up an external UI handler. /// public bool DisableExternalUiHandler { get; set; } /// /// Gets or sets the requested file versioning. /// public BOOTSTRAPPER_MSI_FILE_VERSIONING FileVersioning { get; set; } } /// /// Event arguments for /// [Serializable] public class PlanPackageCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanPackageCompleteEventArgs(string packageId, int hrStatus, RequestState requested) : base(hrStatus) { this.PackageId = packageId; this.Requested = requested; } /// /// Gets the identity of the package planned for. /// public string PackageId { get; private set; } /// /// Gets the requested state for the package. /// public RequestState Requested { get; private set; } } /// /// Event arguments for /// [Serializable] public class PlannedCompatiblePackageEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlannedCompatiblePackageEventArgs(string packageId, string compatiblePackageId, bool remove) { this.PackageId = packageId; this.CompatiblePackageId = compatiblePackageId; this.Remove = remove; } /// /// Gets the identity of the package planned for. /// public string PackageId { get; private set; } /// /// Gets the identity of the compatible package detected. /// public string CompatiblePackageId { get; private set; } /// /// Gets the planned state of the package. /// public bool Remove { get; private set; } } /// /// Event arguments for /// [Serializable] public class PlannedPackageEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlannedPackageEventArgs(string packageId, ActionState execute, ActionState rollback, bool cache, bool uncache) { this.PackageId = packageId; this.Execute = execute; this.Rollback = rollback; this.Cache = cache; this.Uncache = uncache; } /// /// Gets the identity of the package planned for. /// public string PackageId { get; private set; } /// /// Gets the planned execution action. /// public ActionState Execute { get; private set; } /// /// Gets the planned rollback action. /// public ActionState Rollback { get; private set; } /// /// Gets whether the package will be cached. /// public bool Cache { get; private set; } /// /// Gets whether the package will be removed from the package cache. /// public bool Uncache { get; private set; } } /// /// Event arguments for . /// [Serializable] public class PlanCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// Event arguments for /// [Serializable] public class PlanForwardCompatibleBundleEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool recommendedIgnoreBundle, bool cancelRecommendation, bool ignoreBundle) : base(cancelRecommendation) { this.BundleId = bundleId; this.RelationType = relationType; this.BundleTag = bundleTag; this.PerMachine = perMachine; this.Version = version; this.RecommendedIgnoreBundle = recommendedIgnoreBundle; this.IgnoreBundle = ignoreBundle; } /// /// Gets the identity of the forward compatible bundle detected. /// public string BundleId { get; private set; } /// /// Gets the relationship type of the forward compatible bundle. /// public RelationType RelationType { get; private set; } /// /// Gets the tag of the forward compatible bundle. /// public string BundleTag { get; private set; } /// /// Gets whether the forward compatible bundle is per machine. /// public bool PerMachine { get; private set; } /// /// Gets the version of the forward compatible bundle. /// public string Version { get; private set; } /// /// Gets the recommendation of whether the engine should use the forward compatible bundle. /// public bool RecommendedIgnoreBundle { get; set; } /// /// Gets or sets whether the engine will use the forward compatible bundle. /// public bool IgnoreBundle { get; set; } } /// /// Event arguments for /// [Serializable] public class ApplyBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ApplyBeginEventArgs(int phaseCount, bool cancelRecommendation) : base(cancelRecommendation) { this.PhaseCount = phaseCount; } /// /// Gets the number of phases that the engine will go through in apply. /// There are currently two possible phases: cache and execute. /// public int PhaseCount { get; private set; } } /// /// Event arguments for /// [Serializable] public class ElevateBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ElevateBeginEventArgs(bool cancelRecommendation) : base(cancelRecommendation) { } } /// /// Event arguments for . /// [Serializable] public class ElevateCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ElevateCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// Event arguments for /// [Serializable] public class ProgressEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ProgressEventArgs(int progressPercentage, int overallPercentage, bool cancelRecommendation) : base(cancelRecommendation) { this.ProgressPercentage = progressPercentage; this.OverallPercentage = overallPercentage; } /// /// Gets the percentage from 0 to 100 completed for a package. /// public int ProgressPercentage { get; private set; } /// /// Gets the percentage from 0 to 100 completed for the bundle. /// public int OverallPercentage { get; private set; } } /// /// Event arguments for /// [Serializable] public class ErrorEventArgs : ResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ErrorEventArgs(ErrorType errorType, string packageId, int errorCode, string errorMessage, int dwUIHint, string[] data, Result recommendation, Result result) : base(recommendation, result) { this.ErrorType = errorType; this.PackageId = packageId; this.ErrorCode = errorCode; this.ErrorMessage = errorMessage; this.UIHint = dwUIHint; this.Data = new ReadOnlyCollection(data ?? new string[] { }); } /// /// Gets the type of error that occurred. /// public ErrorType ErrorType { get; private set; } /// /// Gets the identity of the package that yielded the error. /// public string PackageId { get; private set; } /// /// Gets the error code. /// public int ErrorCode { get; private set; } /// /// Gets the error message. /// public string ErrorMessage { get; private set; } /// /// Gets the recommended display flags for an error dialog. /// public int UIHint { get; private set; } /// /// Gets the extended data for the error. /// public IList Data { get; private set; } } /// /// Event arguments for /// [Serializable] public class RegisterBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public RegisterBeginEventArgs(RegistrationType recommendedRegistrationType, bool cancelRecommendation, RegistrationType registrationType) : base(cancelRecommendation) { this.RecommendedRegistrationType = recommendedRegistrationType; this.RegistrationType = registrationType; } /// /// Gets the recommended registration type. /// public RegistrationType RecommendedRegistrationType { get; private set; } /// /// Gets or sets the registration type. /// public RegistrationType RegistrationType { get; set; } } /// /// Event arguments for . /// [Serializable] public class RegisterCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public RegisterCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// Event arguments for /// [Serializable] public class UnregisterBeginEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public UnregisterBeginEventArgs(RegistrationType recommendedRegistrationType, RegistrationType registrationType) { this.RecommendedRegistrationType = recommendedRegistrationType; this.RegistrationType = registrationType; } /// /// Gets the recommended registration type. /// public RegistrationType RecommendedRegistrationType { get; private set; } /// /// Gets or sets the registration type. /// public RegistrationType RegistrationType { get; set; } } /// /// Event arguments for /// [Serializable] public class UnregisterCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public UnregisterCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// Event arguments for /// [Serializable] public class CacheBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheBeginEventArgs(bool cancelRecommendation) : base(cancelRecommendation) { } } /// /// EventArgs for . /// [Serializable] public class CacheAcquireBeginEventArgs : CancellableActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheAcquireBeginEventArgs(string packageOrContainerId, string payloadId, string source, string downloadUrl, string payloadContainerId, CacheOperation recommendation, CacheOperation action, bool cancelRecommendation) : base(cancelRecommendation, recommendation, action) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; this.Source = source; this.DownloadUrl = downloadUrl; this.PayloadContainerId = payloadContainerId; } /// /// Gets the identifier of the container or package. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identifier of the payload (if acquiring a payload). /// public string PayloadId { get; private set; } /// /// Gets the source of the container or payload. /// public string Source { get; private set; } /// /// Gets the optional URL to download container or payload. /// public string DownloadUrl { get; private set; } /// /// Gets the optional identity of the container that contains the payload being acquired. /// public string PayloadContainerId { get; private set; } } /// /// EventArgs for . /// [Serializable] public class CacheAcquireProgressEventArgs : CacheProgressBaseEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) { } } /// /// EventArgs for . /// [Serializable] public class CacheAcquireCompleteEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheAcquireCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) : base(hrStatus, recommendation, action) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; } /// /// Gets the identifier of the container or package. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identifier of the payload (if acquiring a payload). /// public string PayloadId { get; private set; } } /// /// EventArgs for . /// [Serializable] public class CacheVerifyBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; } /// /// Gets the identifier of the container or package. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identifier of the payload. /// public string PayloadId { get; private set; } } /// /// EventArgs for . /// [Serializable] public class CacheVerifyProgressEventArgs : CacheProgressBaseEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, CacheVerifyStep verifyStep, bool cancelRecommendation) : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) { this.Step = verifyStep; } /// /// Gets the current verification step. /// public CacheVerifyStep Step { get; private set; } } /// /// Event arguments for /// [Serializable] public class CacheVerifyCompleteEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) : base(hrStatus, recommendation, action) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; } /// /// Gets the identifier of the container or package. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identifier of the payload. /// public string PayloadId { get; private set; } } /// /// Event arguments for . /// [Serializable] public class CacheCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// Event arguments for /// [Serializable] public class ExecuteBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecuteBeginEventArgs(int packageCount, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageCount = packageCount; } /// /// Gets the number of packages to act on. /// public int PackageCount { get; private set; } } /// /// Event arguments for /// [Serializable] public class ExecutePackageBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecutePackageBeginEventArgs(string packageId, bool shouldExecute, ActionState action, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.ShouldExecute = shouldExecute; this.Action = action; this.UiLevel = uiLevel; this.DisableExternalUiHandler = disableExternalUiHandler; } /// /// Gets the identity of the package to act on. /// public string PackageId { get; private set; } /// /// Gets whether the package is being executed or rolled back. /// public bool ShouldExecute { get; private set; } /// /// Gets the action about to be executed. /// public ActionState Action { get; private set; } /// /// Gets the internal UI level (if this is an MSI or MSP package). /// public INSTALLUILEVEL UiLevel { get; private set; } /// /// Gets whether Burn will set up an external UI handler (if this is an MSI or MSP package). /// public bool DisableExternalUiHandler { get; private set; } } /// /// Event arguments for /// [Serializable] public class ExecutePatchTargetEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecutePatchTargetEventArgs(string packageId, string targetProductCode, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.TargetProductCode = targetProductCode; } /// /// Gets the identity of the package to act on. /// public string PackageId { get; private set; } /// /// Gets the product code being targeted. /// public string TargetProductCode { get; private set; } } /// /// Event arguments for /// [Serializable] public class ExecuteMsiMessageEventArgs : ResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecuteMsiMessageEventArgs(string packageId, InstallMessage messageType, int dwUIHint, string message, string[] data, Result recommendation, Result result) : base(recommendation, result) { this.PackageId = packageId; this.MessageType = messageType; this.UIHint = dwUIHint; this.Message = message; this.Data = new ReadOnlyCollection(data ?? new string[] { }); } /// /// Gets the identity of the package that yielded this message. /// public string PackageId { get; private set; } /// /// Gets the type of this message. /// public InstallMessage MessageType { get; private set; } /// /// Gets the recommended display flags for this message. /// public int UIHint { get; private set; } /// /// Gets the message. /// public string Message { get; private set; } /// /// Gets the extended data for the message. /// public IList Data { get; private set; } } /// /// Event arguments for /// [Serializable] public class ExecuteFilesInUseEventArgs : ResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecuteFilesInUseEventArgs(string packageId, string[] files, Result recommendation, FilesInUseType source, Result result) : base(recommendation, result) { this.PackageId = packageId; this.Files = new ReadOnlyCollection(files ?? new string[] { }); this.Source = source; } /// /// Gets the identity of the package that yielded the files in use message. /// public string PackageId { get; private set; } /// /// Gets the list of files in use. /// public IList Files { get; private set; } /// /// Gets the source of the message. /// public FilesInUseType Source { get; private set; } } /// /// Event arguments for /// [Serializable] public class ExecutePackageCompleteEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecutePackageCompleteEventArgs(string packageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action) : base(hrStatus, recommendation, action) { this.PackageId = packageId; this.Restart = restart; } /// /// Gets the identity of the package that was acted on. /// public string PackageId { get; private set; } /// /// Gets the package restart state after being applied. /// public ApplyRestart Restart { get; private set; } } /// /// Event arguments for . /// [Serializable] public class ExecuteCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecuteCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// Event arguments for /// [Serializable] public class ApplyCompleteEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ApplyCompleteEventArgs(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_APPLYCOMPLETE_ACTION action) : base(hrStatus, recommendation, action) { this.Restart = restart; } /// /// Gets the apply restart state when complete. /// public ApplyRestart Restart { get; private set; } } /// /// Event arguments for /// [Serializable] public class ApplyDowngradeEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ApplyDowngradeEventArgs(int hrRecommendation, int hrStatus) { this.Recommendation = hrRecommendation; this.Status = hrStatus; } /// /// Gets the recommended HRESULT. /// public int Recommendation { get; private set; } /// /// Gets or sets the HRESULT for Apply. /// public int Status { get; set; } } /// /// EventArgs for . /// [Serializable] public class CacheAcquireResolvingEventArgs : CancellableActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheAcquireResolvingEventArgs(string packageOrContainerId, string payloadId, string[] searchPaths, bool foundLocal, int recommendedSearchPath, string downloadUrl, string payloadContainerId, CacheResolveOperation recommendation, int chosenSearchPath, CacheResolveOperation action, bool cancel) : base(cancel, recommendation, action) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; this.SearchPaths = searchPaths; this.FoundLocal = foundLocal; this.RecommendedSearchPath = recommendedSearchPath; this.DownloadUrl = downloadUrl; this.PayloadContainerId = payloadContainerId; this.ChosenSearchPath = chosenSearchPath; } /// /// Gets the identity of the package or container that is being acquired. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identity of the payload that is being acquired. /// public string PayloadId { get; private set; } /// /// Gets the search paths used for source resolution. /// public string[] SearchPaths { get; private set; } /// /// Gets whether indicates that a file was found at that search path. /// public bool FoundLocal { get; private set; } /// /// When is true, the index to for the recommended local file. /// public int RecommendedSearchPath { get; private set; } /// /// Gets the optional URL to download container or payload. /// public string DownloadUrl { get; private set; } /// /// Gets the optional identity of the container that contains the payload being acquired. /// public string PayloadContainerId { get; private set; } /// /// Gets or sets the index to to use when is set to . /// public int ChosenSearchPath { get; set; } } /// /// Event arguments for /// [Serializable] public class CachePackageBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CachePackageBeginEventArgs(string packageId, int cachePayloads, long packageCacheSize, bool vital, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.CachePayloads = cachePayloads; this.PackageCacheSize = packageCacheSize; this.Vital = vital; } /// /// Gets the identity of the package that is being cached. /// public string PackageId { get; private set; } /// /// Gets number of payloads to be cached. /// public long CachePayloads { get; private set; } /// /// Gets the size on disk required by the specific package. /// public long PackageCacheSize { get; private set; } /// /// If caching a package is not vital, then acquisition will be skipped unless the BA opts in through . /// public bool Vital { get; private set; } } /// /// Event arguments for /// [Serializable] public class CachePackageCompleteEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CachePackageCompleteEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) : base(hrStatus, recommendation, action) { this.PackageId = packageId; } /// /// Gets the identity of the package that was cached. /// public string PackageId { get; private set; } } /// /// Event arguments for /// [Serializable] public class ExecuteProgressEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecuteProgressEventArgs(string packageId, int progressPercentage, int overallPercentage, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.ProgressPercentage = progressPercentage; this.OverallPercentage = overallPercentage; } /// /// Gets the identity of the package that was executed. /// public string PackageId { get; private set; } /// /// Gets the percentage from 0 to 100 of the execution progress for a single payload. /// public int ProgressPercentage { get; private set; } /// /// Gets the percentage from 0 to 100 of the execution progress for all payloads. /// public int OverallPercentage { get; private set; } } /// /// Event arguments for . /// [Serializable] public class LaunchApprovedExeBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public LaunchApprovedExeBeginEventArgs(bool cancelRecommendation) : base(cancelRecommendation) { } } /// /// Event arguments for . /// [Serializable] public class LaunchApprovedExeCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public LaunchApprovedExeCompleteEventArgs(int hrStatus, int processId) : base(hrStatus) { this.ProcessId = processId; } /// /// Gets the ProcessId of the process that was launched. /// This is only valid if the status reports success. /// public int ProcessId { get; private set; } } /// /// Event arguments for . /// [Serializable] public class BeginMsiTransactionBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public BeginMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) : base(cancelRecommendation) { this.TransactionId = transactionId; } /// /// Gets the MSI transaction Id. /// public string TransactionId { get; private set; } } /// /// Event arguments for . /// [Serializable] public class BeginMsiTransactionCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public BeginMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) : base(hrStatus) { this.TransactionId = transactionId; } /// /// Gets the MSI transaction Id. /// public string TransactionId { get; private set; } } /// /// Event arguments for . /// [Serializable] public class CommitMsiTransactionBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CommitMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) : base(cancelRecommendation) { this.TransactionId = transactionId; } /// /// Gets the MSI transaction Id. /// public string TransactionId { get; private set; } } /// /// Event arguments for . /// [Serializable] public class CommitMsiTransactionCompleteEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CommitMsiTransactionCompleteEventArgs(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action) : base(hrStatus, recommendation, action) { this.TransactionId = transactionId; this.Restart = restart; } /// /// Gets the MSI transaction Id. /// public string TransactionId { get; private set; } /// /// Gets the package restart state after being applied. /// public ApplyRestart Restart { get; private set; } } /// /// Event arguments for . /// [Serializable] public class RollbackMsiTransactionBeginEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public RollbackMsiTransactionBeginEventArgs(string transactionId) { this.TransactionId = transactionId; } /// /// Gets the MSI transaction Id. /// public string TransactionId { get; private set; } } /// /// Event arguments for . /// [Serializable] public class RollbackMsiTransactionCompleteEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public RollbackMsiTransactionCompleteEventArgs(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action) : base(hrStatus, recommendation, action) { this.TransactionId = transactionId; this.Restart = restart; } /// /// Gets the MSI transaction Id. /// public string TransactionId { get; private set; } /// /// Gets the package restart state after being applied. /// public ApplyRestart Restart { get; private set; } } /// /// Event arguments for . /// [Serializable] public class PauseAutomaticUpdatesBeginEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PauseAutomaticUpdatesBeginEventArgs() { } } /// /// Event arguments for . /// [Serializable] public class PauseAutomaticUpdatesCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PauseAutomaticUpdatesCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// Event arguments for . /// [Serializable] public class SystemRestorePointBeginEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public SystemRestorePointBeginEventArgs() { } } /// /// Event arguments for . /// [Serializable] public class SystemRestorePointCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public SystemRestorePointCompleteEventArgs(int hrStatus) : base(hrStatus) { } } /// /// EventArgs for . /// [Serializable] public class CacheContainerOrPayloadVerifyBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheContainerOrPayloadVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; } /// /// Gets the identifier of the container or package. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identifier of the payload. /// public string PayloadId { get; private set; } } /// /// EventArgs for . /// [Serializable] public class CacheContainerOrPayloadVerifyProgressEventArgs : CacheProgressBaseEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheContainerOrPayloadVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) { } } /// /// Event arguments for /// [Serializable] public class CacheContainerOrPayloadVerifyCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CacheContainerOrPayloadVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus) : base(hrStatus) { this.PackageOrContainerId = packageOrContainerId; this.PayloadId = payloadId; } /// /// Gets the identifier of the container or package. /// public string PackageOrContainerId { get; private set; } /// /// Gets the identifier of the payload. /// public string PayloadId { get; private set; } } /// /// EventArgs for . /// [Serializable] public class CachePayloadExtractBeginEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CachePayloadExtractBeginEventArgs(string containerId, string payloadId, bool cancelRecommendation) : base(cancelRecommendation) { this.ContainerId = containerId; this.PayloadId = payloadId; } /// /// Gets the identifier of the container. /// public string ContainerId { get; private set; } /// /// Gets the identifier of the payload. /// public string PayloadId { get; private set; } } /// /// EventArgs for . /// [Serializable] public class CachePayloadExtractProgressEventArgs : CacheProgressBaseEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CachePayloadExtractProgressEventArgs(string containerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) : base(containerId, payloadId, progress, total, overallPercentage, cancelRecommendation) { } } /// /// Event arguments for /// [Serializable] public class CachePayloadExtractCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CachePayloadExtractCompleteEventArgs(string containerId, string payloadId, int hrStatus) : base(hrStatus) { this.ContainerId = containerId; this.PayloadId = payloadId; } /// /// Gets the identifier of the container. /// public string ContainerId { get; private set; } /// /// Gets the identifier of the payload. /// public string PayloadId { get; private set; } } /// /// EventArgs for . /// [Serializable] public class SetUpdateBeginEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public SetUpdateBeginEventArgs() { } } /// /// Event arguments for /// [Serializable] public class SetUpdateCompleteEventArgs : StatusEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public SetUpdateCompleteEventArgs(int hrStatus, string previousPackageId, string newPackageId) : base(hrStatus) { this.PreviousPackageId = previousPackageId; this.NewPackageId = newPackageId; } /// /// Gets the identifier of the update package that was removed. /// public string PreviousPackageId { get; private set; } /// /// Gets the identifier of the update package that was added. /// public string NewPackageId { get; private set; } } /// /// Event arguments for /// [Serializable] public class PlanRestoreRelatedBundleEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public PlanRestoreRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) : base(cancelRecommendation) { this.BundleId = bundleId; this.RecommendedState = recommendedState; this.State = state; } /// /// Gets the identity of the bundle to plan for. /// public string BundleId { get; private set; } /// /// Gets the recommended requested state for the bundle. /// public RequestState RecommendedState { get; private set; } /// /// Gets or sets the requested state for the bundle. /// public RequestState State { get; set; } } /// /// Event arguments for /// [Serializable] public class ExecuteProcessCancelEventArgs : HResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public ExecuteProcessCancelEventArgs(string packageId, int processId, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION action) { this.PackageId = packageId; this.ProcessId = processId; this.Recommendation = recommendation; this.Action = action; } /// /// Gets the identity of the package. /// public string PackageId { get; private set; } /// /// Gets the process id. /// public int ProcessId { get; private set; } /// /// Gets the recommended action from the engine. /// public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Recommendation { get; private set; } /// /// Gets or sets the action to be performed. This is passed back to the engine. /// public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Action { get; set; } } /// /// Event arguments for /// [Serializable] public class DetectRelatedBundlePackageEventArgs : CancellableHResultEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public DetectRelatedBundlePackageEventArgs(string packageId, string productCode, RelationType relationType, bool perMachine, string version, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.ProductCode = productCode; this.RelationType = relationType; this.PerMachine = perMachine; this.Version = version; } /// /// Gets the identity of the product's package detected. /// public string PackageId { get; private set; } /// /// Gets the identity of the related bundle detected. /// public string ProductCode { get; private set; } /// /// Gets the relationship type of the related bundle. /// public RelationType RelationType { get; private set; } /// /// Gets whether the detected bundle is per machine. /// public bool PerMachine { get; private set; } /// /// Gets the version of the related bundle detected. /// public string Version { get; private set; } } /// /// Event arguments for /// [Serializable] public class CachePackageNonVitalValidationFailureEventArgs : ActionEventArgs { /// /// This class is for events raised by the engine. /// It is not intended to be instantiated by user code. /// public CachePackageNonVitalValidationFailureEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action) : base(hrStatus, recommendation, action) { this.PackageId = packageId; } /// /// Gets the identity of the package that was being validated. /// public string PackageId { get; private set; } } }