protected virtual void OnProjectCompiledSuccessfully(object sender, CompilerEventArgs args) { if (ProjectCompiledSuccessfully != null) { ProjectCompiledSuccessfully(sender, args); } }
protected override void OnProjectCompiledSuccessfully(CompilerEventArgs args) { // Retrieve new assembly location AssemblyLocation = args.CompilerResults.PathToAssembly; // Copy local references to the output folder var results = args.CompilerResults; var assemblyDir = Path.GetDirectoryName(results.PathToAssembly); foreach (var reference in References.Where((r) => !r.IsGlobal)) { try { var srcFileInfo = new FileInfo(reference.AssemblyLocation); var dstFileName = assemblyDir.ConcatPath(Path.GetFileName(srcFileInfo.Name)); var dstFileInfo = srcFileInfo.CopyTo(dstFileName, true); dstFileInfo.IsReadOnly = false; } catch (IOException) { // Ignore as file is probably in use (because we loaded it) } } base.OnProjectCompiledSuccessfully(args); }
protected virtual void OnProjectCompiledSuccessfully(CompilerEventArgs args) { try { if (ProjectCompiledSuccessfully != null) { ProjectCompiledSuccessfully(this, args); } } catch (Exception e) { Shell.Instance.Logger.Log(e); } }
private void RunWorkerCompletedCB(object sender, RunWorkerCompletedEventArgs args) { CompilerResults = args.Result as CompilerResults; var compilerArgs = new CompilerEventArgs(CompilerResults); if (!CompilerResults.Errors.HasErrors) { AssemblyLocation = CompilerResults.PathToAssembly; OnProjectCompiledSuccessfully(compilerArgs); } OnCompileCompleted(compilerArgs); }
protected virtual void OnCompileCompleted(CompilerEventArgs args) { try { if (CompileCompleted != null) { CompileCompleted(this, args); } } catch (Exception e) { Shell.Instance.Logger.Log(e); } }
public void Compile() { CompilerResults = DoCompile(); var args = new CompilerEventArgs(CompilerResults); if (!CompilerResults.Errors.HasErrors) { AssemblyLocation = CompilerResults.PathToAssembly; OnProjectCompiledSuccessfully(args); } OnCompileCompleted(args); }
void this_ProjectCompiledSuccessfully(object sender, CompilerEventArgs args) { // Copy local references var results = args.CompilerResults; var assemblyDir = Path.GetDirectoryName(results.PathToAssembly); foreach (var reference in References.Where((r) => !r.IsGlobal)) { var srcFileInfo = new FileInfo(reference.AssemblyLocation); var dstFileName = assemblyDir.ConcatPath(Path.GetFileName(srcFileInfo.Name)); var dstFileInfo = srcFileInfo.CopyTo(dstFileName, true); dstFileInfo.IsReadOnly = false; } }
protected virtual void OnCompileCompleted(CompilerEventArgs args) { try { if (!args.CompilerResults.Errors.HasErrors) { OnProjectCompiledSuccessfully(args); } if (CompileCompleted != null) { CompileCompleted(this, args); } } catch (Exception e) { Shell.Instance.Logger.Log(e); } }
void Project_Compiled(object sender, CompilerEventArgs args) { // Refire this event OnProjectCompiledSuccessfully(sender, args); }