Пример #1
0
        private bool GenerateProjectFiles(string location, bool sort_using, bool generate_document_comment, string compagny_name, string copyright_header, string author)
        {
            bool success = true;

            location = Path.Combine(location, Project.Name);

            ProjectGenerators.Clear( );
            foreach (IProjectItem projectItem in Project.Items)
            {
                Model model = projectItem as Model;

                if (model != null)
                {
                    ProjectGenerator projectGenerator = CreateProjectGenerator(model);
                    ProjectGenerators.Add(projectGenerator);

                    try
                    {
                        projectGenerator.Generate(location, sort_using, generate_document_comment, compagny_name, copyright_header, author);
                    }
                    catch (FileGenerationException)
                    {
                        success = false;
                    }
                }
            }

            return(success);
        }
Пример #2
0
        private bool GenerateProjectFiles(string location)
        {
            bool success = true;

            location = Path.Combine(location, project.Name);

            projectGenerators.Clear();
            //TODO model is no longer an project item, must be fixed
            foreach (IProjectItem projectItem in project.Items)
            {
                ClassModel model = projectItem.Model as ClassModel;

                if (model != null)
                {
                    ProjectGenerator projectGenerator = CreateProjectGenerator(model);
                    projectGenerators.Add(projectGenerator);

                    try
                    {
                        projectGenerator.Generate(location);
                    }
                    catch (FileGenerationException)
                    {
                        success = false;
                    }
                }
            }

            return(success);
        }
Пример #3
0
        private bool GenerateProjectFiles(string location)
        {
            bool success = true;

            location = Path.Combine(location, Project.Name);

            ProjectGenerators.Clear();
            foreach (IProjectItem projectItem in Project.Items)
            {
                if (projectItem is Model model)
                {
                    ProjectGenerator projectGenerator = CreateProjectGenerator(model);
                    ProjectGenerators.Add(projectGenerator);

                    try
                    {
                        success &= projectGenerator.Generate(location);
                    }
                    catch (FileGenerationException)
                    {
                        success = false;
                    }
                }
            }

            return(success);
        }
Пример #4
0
        /// <exception cref="ArgumentNullException">
        /// <paramref name="project"/> is null.
        /// </exception>
        public Generator(ProjectCore project)
        {
            if (project == null)
            {
                throw new ArgumentNullException("project");
            }

            projectGenerator = CreateProjectGenerator(project);
        }