示例#1
0
        static IEnumerable <NuGetProject> GetNuGetProjects(MonoDevelopSolutionManager solutionManager)
        {
            var factory = new ConsoleHostNuGetProjectFactory(solutionManager.Settings);

            foreach (DotNetProject project in solutionManager.Solution.GetAllDotNetProjects())
            {
                yield return(factory.CreateNuGetProject(project));
            }
        }
示例#2
0
        public Task <NuGetProject> GetNuGetProjectAsync(string nuGetProjectSafeName)
        {
            GetSolutionManager();

            NuGetProject project = null;

            var dotNetProject = IdeApp.ProjectOperations.CurrentSelectedSolution?.FindProjectByName(nuGetProjectSafeName) as DotNetProject;

            if (dotNetProject != null)
            {
                var factory = new ConsoleHostNuGetProjectFactory(solutionManager.Settings);
                project = factory.CreateNuGetProject(dotNetProject);
            }

            return(Task.FromResult(project));
        }
示例#3
0
        public NuGetProject GetNuGetProject(string nuGetProjectSafeName)
        {
            GetSolutionManager();

            NuGetProject project = null;

            Runtime.RunInMainThread(() => {
                var dotNetProject = IdeApp.ProjectOperations.CurrentSelectedSolution?.FindProjectByName(nuGetProjectSafeName) as DotNetProject;
                if (dotNetProject != null)
                {
                    var factory = new ConsoleHostNuGetProjectFactory(solutionManager.Settings);
                    project     = factory.CreateNuGetProject(dotNetProject);
                }
            }).Wait();

            return(project);
        }