private bool GenerateSourceFiles(string location, bool sort_using, bool generate_document_comment, string compagny_name, string copyright_header, string author) { bool success = true; location = Path.Combine(location, ProjectName); fileNames.Clear(); foreach (IEntity entity in model.Entities) { TypeBase type = entity as TypeBase; if (type != null && !type.IsNested) { SourceFileGenerator sourceFile = CreateSourceFileGenerator(type, sort_using, generate_document_comment, compagny_name, copyright_header, author); try { string fileName = sourceFile.Generate(location); fileNames.Add(fileName); } catch (FileGenerationException) { success = false; } } } return(success); }
/// <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); }