int IVsSolutionEvents.OnAfterOpenSolution(object pUnkReserved, int fNewSolution) { var port = Network.freeTcpPort(); Logger.LogInfo("Package: Selected {0} as the port for Engine server.", port); TddStud10Host = new TddStud10HostProxy(port, FSharpOption <bool> .None); TddStud10Host.Start(); var cfg = EngineConfigLoader.load(new EngineConfig(), FilePath.NewFilePath(GetSolutionPath())); EngineLoader.Load( this, new EngineParams( HostVersion, cfg, FilePath.NewFilePath(GetSolutionPath()), DateTime.UtcNow )); if (!cfg.IsDisabled) { EngineLoader.EnableEngine(); } else { TelemetryClient.TrackEvent("EngineDisabledOnLoad", new Dictionary <string, string>(), new Dictionary <string, double>()); } Logger.LogInfo("Triggering SnapshotGC on solution load."); SnapshotGC.SweepAsync(FilePath.NewFilePath(Environment.ExpandEnvironmentVariables(cfg.SnapShotRoot))); return(VSConstants.S_OK); }
private void OnBuildDone(vsBuildScope scope, vsBuildAction action) { if (buildEventEnableEngine) { buildEventEnableEngine = false; EngineLoader.EnableEngine(); } }
private void ExecuteChangeTddStud10State(object sender, EventArgs e) { Logger.LogInfo("Changing TddStud10 state..."); if (EngineLoader.IsEngineEnabled()) { EngineLoader.DisableEngine(); SetTddStudioDisable(true); } else { EngineLoader.EnableEngine(); SetTddStudioDisable(false); } }