Esempio n. 1
0
        private ModuleRepository GenerateWorkspaceRepo(WorkspaceEvaluationHelper helper, SimpleGraph file2file, int[] selectedFiles)
        {
            XAssert.IsTrue(file2file.IsDAG(), "Must be a DAG");
            var specs = selectedFiles
                        .Select(i =>
            {
                var specsToImport = file2file.OutgoingEdges(i).Select(e => e.Dest).ToList();
                var specContent   = GenerateSpec(i, specsToImport);
                return(new ModuleRepository.NameContentPair(GetSpecName(i), specContent));
            })
                        .Concat(new[]
            {
                new ModuleRepository.NameContentPair(HelperSpecName, GetHelperSpecContent()),
                new ModuleRepository.NameContentPair(Qualifier, GetSpecWithDefaultQualifierContent()),
            })
                        .ToArray();

            return(helper.NewModuleRepoWithPrelude().AddContent(TestModule, specs));
        }