Exemplo n.º 1
0
        /// <summary>
        /// Return all possibly valid project names in the current solution. This includes all
        /// unique names and safe names.
        /// </summary>
        /// <returns></returns>
        private async Task <IEnumerable <string> > GetAllValidProjectNamesAsync()
        {
            var nugetProjects = await VsSolutionManager.GetNuGetProjectsAsync();

            var safeNames = await Task.WhenAll(nugetProjects?.Select(p => VsSolutionManager.GetNuGetProjectSafeNameAsync(p)));

            var uniqueNames = nugetProjects?.Select(p => NuGetProject.GetUniqueNameOrName(p));

            return(uniqueNames.Concat(safeNames).Distinct());
        }