// Compile() is called by a background Thread in ProgressForm so be carful void ICompilableHelp.Compile(IProgressReporter progressReporter) //Called by Progress form { try { HxComp hxsCompiler = new HxComp(); hxsCompiler.Initialize(); CompMsg compMsg = new CompMsg(progressReporter, this.logFile); compMsg.Log("Date: " + DateTime.Today.ToShortDateString() + ", " + DateTime.Today.ToShortTimeString()); compMsg.Log("Log file: " + logFile); compMsg.Log("Project file: " + projectFile); compMsg.Log(""); int cookie = hxsCompiler.AdviseCompilerMessageCallback(compMsg); // Compile // hxsCompiler.Compile(projectFile, hxsDir, outputFile, 0); hxsCompiler.UnadviseCompilerMessageCallback(cookie); //Done - Break link with compMsg Obj compMsg.SaveLog(); hxsCompiler = null; //Show the log file if errors if (compMsg.ErrorCount > 0) //If nore Warnings { SafeShowCompileError(); } } catch (Exception ex) { throw ex; } }
void ICompilable.Compile(IProgressReporter progressReporter) { HxComp hxsCompiler = new HxComp(); hxsCompiler.Initialize(); //MSHelpCompilerError compilerError = new MSHelpCompilerError(); CompMsg compilerError; compilerError = new CompMsg(progressReporter); int i = hxsCompiler.AdviseCompilerMessageCallback(compilerError); hxsCompiler.Compile(projectFile, projectRoot, outputFile, 0); //if (compilerError.HxErrorType != MSHelpCompilerError.ErrorType.None) //{ // Console.WriteLine(compilerError.ShortErrorDescription); //} hxsCompiler.UnadviseCompilerMessageCallback(i); hxsCompiler = null; }
//Called by Progress form // Compile() is called by a background Thread in ProgressForm so be carful void ICompilableHelp.Compile(IProgressReporter progressReporter) { try { HxComp hxsCompiler = new HxComp(); hxsCompiler.Initialize(); CompMsg compMsg = new CompMsg(progressReporter, this.logFile); compMsg.Log("Date: " + DateTime.Today.ToShortDateString() + ", " + DateTime.Today.ToShortTimeString()); compMsg.Log("Log file: " + logFile); compMsg.Log("Project file: " + projectFile); compMsg.Log(""); int cookie = hxsCompiler.AdviseCompilerMessageCallback(compMsg); // Compile // hxsCompiler.Compile(projectFile, hxsDir, outputFile, 0); hxsCompiler.UnadviseCompilerMessageCallback(cookie); //Done - Break link with compMsg Obj compMsg.SaveLog(); hxsCompiler = null; //Show the log file if errors if (compMsg.ErrorCount > 0) //If nore Warnings { SafeShowCompileError(); } } catch (Exception ex) { throw ex; } }
public void Detach(HxComp hxCompiler) { BuildExceptions.NotNull(hxCompiler, "hxCompiler"); hxCompiler.UnadviseCompilerMessageCallback(_adviseCookie); }