Exemplo n.º 1
0
        public static bool TryGetProject(string inputPath, out Project project)
        {
            string projectName;
            var projectJsonPath = GetProjectJsonPath(inputPath, out projectName);

            if (!File.Exists(projectJsonPath))
            {
                project = null;
                return false;
            }

            using (var stream = File.OpenRead(projectJsonPath))
            {
                project = GetProject(stream, projectJsonPath, projectName);
            }

            return true;
        }