Beispiel #1
0
        /// <summary>Called when the engine completes caching of the container or payload.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnCacheAcquireComplete(Wix.CacheAcquireCompleteEventArgs args)
        {
            LogVerbose("Enter Method: OnCacheAcquireComplete");
            WPFBootstrapperEventArgs <Wix.CacheAcquireCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.CacheAcquireCompleteEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnCacheAcquireComplete(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnCacheAcquireComplete(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnCacheAcquireComplete");
        }
        /// <summary>Called when the engine completes caching of the container or payload.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnCacheAcquireComplete(Wix.CacheAcquireCompleteEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "CacheAcquireComplete");
            WPFBootstrapperEventArgs <Wix.CacheAcquireCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.CacheAcquireCompleteEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model.OnCacheAcquireComplete(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnCacheAcquireComplete(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "CacheAcquireComplete");
        }
		void CacheAcquireComplete(object sender, CacheAcquireCompleteEventArgs e)
		{
			this.AddPackageTelemetry("Cache", e.PackageOrContainerId ?? String.Empty, DateTime.Now.Subtract(_cachePackageStart).TotalMilliseconds, e.Status);
		}
Beispiel #4
0
 /// <summary>
 /// Called when the engine complets caching of the container or payload.
 /// </summary>
 /// <param name="args"></param>
 protected virtual void OnCacheAcquireComplete(CacheAcquireCompleteEventArgs args)
 {
     EventHandler<CacheAcquireCompleteEventArgs> handler = this.CacheAcquireComplete;
     if (null != handler)
     {
         handler(this, args);
     }
 }
Beispiel #5
0
        Result IBootstrapperApplication.OnCacheAcquireComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, int nRecommendation)
        {
            CacheAcquireCompleteEventArgs args = new CacheAcquireCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, nRecommendation);
            this.OnCacheAcquireComplete(args);

            return args.Result;
        }
		void OnCacheAcquireComplete(object sender, CacheAcquireCompleteEventArgs e)
		{
			if (e.Status != 0)
			{
				_completedStepVmFactory.GetViewModelInstance().Message = "Failed to acquire one of the prerequisites, you must be connected to internet.";
				_completedStepVmFactory.GetViewModelInstance().Result = OperationResult.Failed;
			}
		}