Exemple #1
0
 void GenerateDtoClasses()
 {
     foreach (var type in DtoTypes.All)
     {
         Console.Write("Adding DTO class " + type.Name + "...");
         var dto = new DtoProgrammer(type);
         Folder.GetFile(type.Name + ".cs").WriteAllText(dto.Generate());
         Console.WriteLine("Done");
     }
 }
Exemple #2
0
        void GenerateDataProviderClasses()
        {
            foreach (var type in DtoTypes.All)
            {
                Console.Write("Adding DTO class " + type.Name + "...");
                var dto = new DtoProgrammer(type);
                Folder.GetFile(type.Name + ".cs").WriteAllText(dto.Generate());

                var dataProvider = new DtoDataProviderClassGenerator(type).Generate();
                if (dataProvider.HasValue())
                {
                    Folder.GetFile(type.Name + "DataProvider.cs").WriteAllText(dataProvider);
                }

                Console.WriteLine("Done");
            }
        }