Beispiel #1
0
        public static CPSProject CreateNonCompilableProject(TestEnvironment environment, string projectName, string projectFilePath)
        {
            var hierarchy = environment.CreateHierarchy(projectName, projectFilePath, "");

            return(CPSProjectFactory.CreateCPSProject(
                       environment.ProjectTracker,
                       environment.ServiceProvider,
                       hierarchy,
                       projectName,
                       projectFilePath,
                       Guid.NewGuid(),
                       NoCompilationConstants.LanguageName,
                       commandLineParserService: null,
                       binOutputPath: null));
        }
Beispiel #2
0
        public static CPSProject CreateCSharpCPSProject(TestEnvironment environment, string projectName, Guid projectGuid, params string[] commandLineArguments)
        {
            var projectFilePath       = Path.GetTempPath();
            var hierarchy             = environment.CreateHierarchy(projectName, projectFilePath, "CSharp");
            var commandLineForOptions = string.Join(" ", commandLineArguments);

            return(CPSProjectFactory.CreateCPSProject(
                       environment.ProjectTracker,
                       environment.ServiceProvider,
                       hierarchy,
                       projectName,
                       projectFilePath,
                       projectGuid,
                       LanguageNames.CSharp,
                       new TestCSharpCommandLineParserService(),
                       commandLineForOptions));
        }