Пример #1
0
 protected override void RunCore()
 {
     if (LoadConfiguration())
     {
         List <Exception> exs = new List <Exception>();
         try
         {
             foreach (ContractServiceDefinition Interface in _Configuration.ContractServiceInterfaces)
             {
                 ClassTemplate template = new ClassTemplate();
                 template.Class       = (ContractServiceClassDefinition)Interface;
                 template.Output.File = String.Format(@"{0}.cs", template.Class.Name);
                 template.Render();
             }
         }
         catch (Exception ex)
         {
             exs.Add(ex);
         }
         if (exs.Count > 0)
         {
             ErrorTemplate errortemplate = new ErrorTemplate();
             ErrorTemplate.Exceptions  = exs;
             errortemplate.Output.File = "Error.log";
             errortemplate.Render();
             throw new Exception("See generated output for errors.");
         }
     }
 }
Пример #2
0
 protected override void RunCore()
 {
     if (LoadConfiguration())
     {
         List <Exception> exs = new List <Exception>();
         try
         {
             foreach (var item in _Configuration.DomainObjectClasses)
             {
                 ClassTemplate template = new ClassTemplate();
                 template.Class       = item;
                 template.Output.File = String.Format(@"{0}.cs", item.Name);
                 template.Render();
             }
         }
         catch (Exception ex)
         {
             exs.Add(ex);
         }
         if (exs.Count > 0)
         {
             ErrorTemplate errortemplate = new ErrorTemplate();
             ErrorTemplate.Exceptions = exs;
             errortemplate.Render();
             throw new Exception("See generated output for errors.");
         }
     }
 }