Ejemplo n.º 1
0
        private TaskResult Execute(NuGetRestoreParameters data)
        {
            StringBuilder arguments = new StringBuilder("restore ");
            string        tool      = data.Path.Resolve();

            if (data.Solution != null)
            {
                arguments.Append(data.Solution.Execute().Single());
                arguments.Append(" ");
            }

            ProcessStartInfo info = new ProcessStartInfo
            {
                FileName         = tool,
                WorkingDirectory = Container.Storage.Local.Path,
                Arguments        = arguments.ToString().TrimEnd()
            };

            if (Container.Shell.Start(info) != 0)
            {
                return(TaskResult.Unsuccessful);
            }

            return(TaskResult.Successful);
        }
Ejemplo n.º 2
0
        public ITask Execute()
        {
            return(new NuGetRestoreTask(() =>
            {
                NuGetRestoreParameters instance = new NuGetRestoreParameters
                {
                    Path = NuGetConfiguration.Instance.Path
                };

                return instance;
            }));
        }