Beispiel #1
0
        public static IProject Create([NotNull] string projectFileDescription)
        {
            // Find name of the project and path to the file in the description.
            List <int> quoteIndices = projectFileDescription.AllIndexesOf("\"");
            string     projectName  =
                projectFileDescription.Substring
                (
                    // Name of the project is between third and fourth quotation marks.
                    quoteIndices[2] + 1, quoteIndices[3] - quoteIndices[2] - 1
                );
            string projectPath =
                projectFileDescription.Substring
                (
                    // Path is between fifth and sixth quotation marks.
                    quoteIndices[4] + 1, quoteIndices[5] - quoteIndices[4] - 1
                );

            return
                (ProjectFactory.Create
                 (
                     projectName,
                     Path.Combine(CodeSolution.SolutionFolder, projectPath)
                 ));
        }