Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Simple test of constructing the objects...");
            DALSettingsSection dss = null;

            var config = ConfigurationManager.OpenExeConfiguration(null);

            dss = (DALSettingsSection)config.Sections["dalSettings"];

            Console.WriteLine("Looking for templates in this folder: " + dss.BaseTemplateFolder);

            DALSettings settings = new DALSettings(dss);
            ProcessDAL  pd       = new ProcessDAL(settings);

            if (pd.GenerateAllFiles())
            {
                Console.WriteLine("Files generated successfully.");
                Console.WriteLine("Please check the " + dss.BaseOutputFolder + " folder for results.");
            }
            else
            {
                Console.WriteLine("There was some sort of processing error.");
                Console.WriteLine("Check the log files.");
            }

            Console.Write("End of test.  Press Enter...");
            Console.ReadLine();
        }
Пример #2
0
        void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            DALSettingsSection sect = e.Argument as DALSettingsSection;

            DALSettings settings = new DALSettings(sect);
            ProcessDAL  pd       = new ProcessDAL(settings);

            e.Result = pd.GenerateAllFiles();
        }