Пример #1
0
        static void Main(string[] args)
        {
            //Date: 2019. 11. 4. 14:20

            log.Debug("path:" + GetAppConfigStringParameter(APPSETTINGS_CLASSNAME));

            try
            {
                string[] files =
                    Directory.GetFiles(APPSETTINGS_INPATH, "*.xml", SearchOption.TopDirectoryOnly);

                foreach (var _file in files)
                {
                    string _filename = Path.GetFileNameWithoutExtension(_file);
                    Console.WriteLine(_filename);

                    Ac4yClass ac4y = DeserialiseMethod.deser(_file);

                    GenerateClass.generateClass(ac4y, APPSETTINGS_OUTPUTPATH, files, APPSETTINGS_NAMESPACE);
                }
            } catch (Exception _exception)
            {
                log.Error(_exception.StackTrace);
            }
        }
Пример #2
0
        public static void entityGenerateMethods(string[] files, string package)
        {
            List <Ac4yClass> list = new List <Ac4yClass>();

            string[] files2 = files;

            foreach (var _file in files2)
            {
                string _filename = Path.GetFileNameWithoutExtension(_file);
                list.Add(DeserialiseMethod.deser(_file));
            }


            Generator.contextGenerate("Template", APPSETTINGS_OUTPUTPATH, list, package);


            for (var x = 0; x < files2.Length; x++)
            {
                string _filename = Path.GetFileNameWithoutExtension(files2[x]);

                Generator.generateEntityMethods("TemplateEntityMethods", package, list[x], APPSETTINGS_OUTPUTPATH);

                Generator.programGenerator("TemplateSaveProgram", package, list[x], APPSETTINGS_OUTPUTPATH);
            }
        }