Ejemplo n.º 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");
     }
 }
Ejemplo n.º 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");
            }
        }