int IVsDeployableProjectCfg.StopDeploy(int fSync)
        {
            IVsTask localAppContainerBootstrapperOperation = null;
            IVsAppContainerProjectDeployOperation localAppContainerDeployOperation = null;

            lock (syncObject)
            {
                localAppContainerBootstrapperOperation = this.appContainerBootstrapperOperation;
                localAppContainerDeployOperation       = this.appContainerDeployOperation;
                this.appContainerBootstrapperOperation = null;
                this.appContainerDeployOperation       = null;
            }

            if (localAppContainerBootstrapperOperation != null)
            {
                localAppContainerBootstrapperOperation.Cancel();
                if (fSync != 0)
                {
                    try
                    {
                        localAppContainerBootstrapperOperation.Wait();
                    }
                    catch
                    {
                    }
                }
            }

            if (localAppContainerDeployOperation != null)
            {
                localAppContainerDeployOperation.StopDeploy(fSync != 0);
            }

            return(VSConstants.S_OK);
        }
Example #2
0
        public int StopDeploy(int fSync)
        {
            IVsTask bootstrapOp = null;
            IVsAppContainerProjectDeployOperation deployOp = null;
            int result = VSConstants.S_OK;

            lock (syncObject) {
                bootstrapOp = appContainerBootstrapperOperation;
                deployOp    = this.deployOp;
                appContainerBootstrapperOperation = null;
                this.deployOp = null;
            }

            if (bootstrapOp != null)
            {
                bootstrapOp.Cancel();
                if (fSync != 0)
                {
                    try {
                        bootstrapOp.Wait();
                    } catch (Exception e) {
                        if (outputWindow != null)
                        {
                            outputWindow.OutputString(e.ToString());
                        }
                        result = VSConstants.E_FAIL;
                    }
                }
            }

            if (deployOp != null)
            {
                deployOp.StopDeploy(fSync != 0);
            }

            return(result);
        }
Example #3
0
        public int StopDeploy(int fSync) {
            IVsTask bootstrapOp = null;
            IVsAppContainerProjectDeployOperation deployOp = null;
            int result = VSConstants.S_OK;

            lock (syncObject) {
                bootstrapOp = appContainerBootstrapperOperation;
                deployOp = this.deployOp;
                appContainerBootstrapperOperation = null;
                this.deployOp = null;
            }

            if (bootstrapOp != null) {
                bootstrapOp.Cancel();
                if (fSync != 0) {
                    try {
                        bootstrapOp.Wait();
                    } catch (Exception e) {
                        if (outputWindow != null) {
                            outputWindow.OutputString(e.ToString());
                        }
                        result = VSConstants.E_FAIL;
                    }
                }
            }

            if (deployOp != null) {
                deployOp.StopDeploy(fSync != 0);
            }

            return result;
        }