private bool GenerateSourceFiles(string location, string projectName) { bool succeed = true; location = Path.Combine(location, projectName); fileNames.Clear(); foreach (IEntity entity in project.Entities) { TypeBase type = entity as TypeBase; if (type != null && !type.IsNested) { SourceFileGenerator sourceFile = CreateSourceFileGenerator(type); try { string fileName = sourceFile.Generate(location); fileNames.Add(fileName); } catch (FileGenerationException) { succeed = false; } } } SourceFileGenerator.FinishWork(); return(succeed); }
/// <exception cref="ArgumentException"> /// <paramref name="location"/> contains invalid path characters. /// </exception> public GenerationResult Generate(string location) { GenerationResult result = solutionGenerator.Generate(location); SourceFileGenerator.FinishWork(); return(result); }
/// <exception cref="ArgumentException"> /// <paramref name="location"/> contains invalid path characters. /// </exception> public GenerationResult Generate(string location, bool sort_using, bool generate_document_comment, string compagny_name, string copyright_header, string author) { GenerationResult result = solutionGenerator.Generate(location, sort_using, generate_document_comment, compagny_name, copyright_header, author); SourceFileGenerator.FinishWork(); return(result); }