Generate() 공개 메소드

/// An error has occured while generating the source file. ///
public Generate ( string directory ) : string
directory string
리턴 string
예제 #1
0
        private bool GenerateSourceFiles(string location)
        {
            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.IsTypeNested)
                {
                    SourceFileGenerator sourceFile = CreateSourceFileGenerator(type);

                    try
                    {
                        string fileName = sourceFile.Generate(location);
                        fileNames.Add(fileName);
                    }
                    catch (FileGenerationException)
                    {
                        success = false;
                    }
                }
            }

            return(success);
        }
예제 #2
0
        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);
        }