Example #1
0
 static void Main(string[] args)
 {
     try
     {
         new CodeGenManager("../../../../test/TestData/ApiController_SimpleInterface/ApiController_SimpleInterface.csproj",
                            new ApiControllerGenerator()).CodeGen(Console.Out).Wait();
     }
     catch (ReflectionTypeLoadException exception)
     {
         LoaderExceptionUtils.LogExceptionDetails(exception.LoaderExceptions, Console.Out);
     }
     Console.ReadLine();
 }
Example #2
0
 public override bool Execute()
 {
     try
     {
         using (var streamWriter = new StreamWriter(OutputPath))
         {
             new CodeGenManager(ProjectPath, GetCodeGenParticipants()).CodeGen(streamWriter).Wait();
         }
         return(true);
     }
     catch (ReflectionTypeLoadException exception)
     {
         StringWriter strWriter = new StringWriter();
         LoaderExceptionUtils.LogExceptionDetails(exception.LoaderExceptions, strWriter);
         LogMessage(strWriter.ToString());
     }
     catch (Exception e)
     {
         LogMessage(e.ToString());
     }
     return(false);
 }