Ejemplo n.º 1
0
        /// <summary>
        /// Generates folder of definitions
        /// </summary>
        /// <param name="path"></param>
        public static void GenerateCode(DocProject project, string path)
        {
            foreach (DocSection docSection in project.Sections)
            {
                foreach (DocSchema docSchema in docSection.Schemas)
                {
                    foreach (DocType docType in docSchema.Types)
                    {
                        using (FormatJAV format = new FormatJAV(path + @"\" + docSchema.Name + @"\" + docType.Name + ".java"))
                        {
                            format.Instance = project;
                            format.Definition = docType;
                            format.Save();
                        }
                    }

                    foreach (DocEntity docType in docSchema.Entities)
                    {
                        using (FormatJAV format = new FormatJAV(path + @"\" + docSchema.Name + @"\" + docType.Name + ".java"))
                        {
                            format.Instance = project;
                            format.Definition = docType;
                            format.Save();
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Generates folder of definitions
        /// </summary>
        /// <param name="path"></param>
        public static void GenerateCode(DocProject project, string path)
        {
            foreach (DocSection docSection in project.Sections)
            {
                foreach (DocSchema docSchema in docSection.Schemas)
                {
                    foreach (DocType docType in docSchema.Types)
                    {
                        using (FormatJAV format = new FormatJAV(path + @"\" + docSchema.Name + @"\" + docType.Name + ".java"))
                        {
                            format.Instance   = project;
                            format.Definition = docType;
                            format.Save();
                        }
                    }

                    foreach (DocEntity docType in docSchema.Entities)
                    {
                        using (FormatJAV format = new FormatJAV(path + @"\" + docSchema.Name + @"\" + docType.Name + ".java"))
                        {
                            format.Instance   = project;
                            format.Definition = docType;
                            format.Save();
                        }
                    }
                }
            }
        }