Example #1
0
        public void Run(ProcessPackageAction action)
        {
            var actions = new List <ProcessPackageAction>();

            actions.Add(action);
            Run(actions);
        }
        public void Run(ProcessPackageAction action)
        {
            if (ShouldRunActionInConsole(action)) {
                ReportScriptsWillNotBeRun();
            }

            action.Execute();
        }
Example #3
0
		public void Run(ProcessPackageAction action)
		{
			if (ShouldRunActionInConsole(action)) {
				consolePackageActionRunner.Run(action);
			} else {
				action.Execute();
			}
		}
        ProcessPackageAction CreateUninstallPackageActionForSelectedProject(IPackageManagementSelectedProject selectedProject)
        {
            ProcessPackageAction action = base.CreateUninstallPackageAction(selectedProject);

            if (IsPackageInstalled(action.Project))
            {
                return(action);
            }
            return(null);
        }
Example #5
0
		bool ShouldRunActionInConsole(ProcessPackageAction action)
		{
			if (action.HasPackageScriptsToRun()) {
				if (powerShellDetection.IsPowerShell2Installed()) {
					return true;
				} else {
					ReportPowerShellIsNotInstalled();
				}
			}
			return false;
		}
        protected ProcessPackageAction CreateUninstallPackageAction(IPackageManagementSelectedProject selectedProject)
        {
            IPackageManagementProject project = selectedProject.Project;

            project.Logger = logger;

            ProcessPackageAction action = project.CreateUninstallPackageAction();

            action.Package = package;
            return(action);
        }
 public void Run(ProcessPackageAction action)
 {
     if (ShouldRunActionInConsole(action))
     {
         consolePackageActionRunner.Run(action);
     }
     else
     {
         action.Execute();
     }
 }
        public IList <ProcessPackageAction> GetProcessPackageActionsForSelectedProjects(
            IEnumerable <IPackageManagementSelectedProject> selectedProjects)
        {
            var actions = new List <ProcessPackageAction>();

            foreach (IPackageManagementSelectedProject selectedProject in selectedProjects)
            {
                ProcessPackageAction action = CreatePackageManageAction(selectedProject);
                if (action != null)
                {
                    actions.Add(action);
                }
            }
            return(actions);
        }
 bool ShouldRunActionInConsole(ProcessPackageAction action)
 {
     if (action.HasPackageScriptsToRun())
     {
         if (powerShellDetection.IsPowerShell2Installed())
         {
             return(true);
         }
         else
         {
             ReportPowerShellIsNotInstalled();
         }
     }
     return(false);
 }
        public virtual IList <ProcessPackageAction> GetProcessPackageActionsForSelectedProjects(
            IList <IPackageManagementSelectedProject> selectedProjects)
        {
            var actions = new List <ProcessPackageAction>();

            foreach (IPackageManagementSelectedProject selectedProject in selectedProjects)
            {
                if (selectedProject.IsSelected)
                {
                    ProcessPackageAction action = CreateInstallPackageAction(selectedProject);
                    actions.Add(action);
                }
            }
            return(actions);
        }
 bool ShouldRunActionInConsole(ProcessPackageAction action)
 {
     return action.HasPackageScriptsToRun();
 }
Example #12
0
		public void AddAction(ProcessPackageAction action)
		{
			actions.Enqueue(action);
		}
Example #13
0
		public bool GetNextAction(out ProcessPackageAction action)
		{
			return actions.TryDequeue(out action);
		}
Example #14
0
 public void AddAction(ProcessPackageAction action)
 {
     actions.Enqueue(action);
 }
Example #15
0
 public bool GetNextAction(out ProcessPackageAction action)
 {
     return(actions.TryDequeue(out action));
 }
		public void Run(ProcessPackageAction action)
		{
			var actions = new List<ProcessPackageAction>();
			actions.Add(action);
			Run(actions);
		}
Example #17
0
 void AddNewActionToRun(ProcessPackageAction action)
 {
     packageActionsToRun.AddAction(action);
 }
		void AddNewActionToRun(ProcessPackageAction action)
		{
			packageActionsToRun.AddAction(action);
		}
		public void Run(ProcessPackageAction action)
		{
			ActionPassedToRun = action;
			ActionsPassedToRun.Add(action);
		}
		public void Run(ProcessPackageAction action)
		{
			IsRunCalled = true;
			ActionPassedToRun = action;
			ActionsPassedToRun.Add(action);
		}