예제 #1
0
        private void ExecuteBariAction(string actionName, Action <bool> after = null)
        {
            var solutionInfo = new SolutionInfo(GetDte());

            CancelAnyPreviousBariAction();

            var output         = owner.GetService <SVsOutputWindow>() as IVsOutputWindow;
            var bariOutputPane = new BariOutputPane(output);

            bariOutputPane.Clear();
            bariOutputPane.WriteLine(string.Format("Executing bari {0}...\n", actionName));

            var workingDirectory = solutionInfo.BariWorkingDirectory;

            var bariConfig = solutionInfo.BariConfig;

            bariShell = new BariShell(bariConfig.BariPath, bariConfig.Goal, bariConfig.Target, workingDirectory, bariOutputPane);
            bariShell.ExecuteAsync(actionName, cancelled =>
            {
                CancelAnyPreviousBariAction();
                if (!cancelled)
                {
                    isBuildNeeded = false;
                }
                if (after != null)
                {
                    after(cancelled);
                }
            });
        }
예제 #2
0
 public BariShell(string bariPath, string goal, string productName, string workingDirectory, BariOutputPane bariOutputPane)
 {
     this.bariPath         = bariPath;
     this.bariOutputPane   = bariOutputPane;
     this.goal             = goal;
     this.productName      = productName;
     this.workingDirectory = workingDirectory;
 }