private static string GetSessionId(IDataContext context) { UnitTestSession session = GetUnitTestSession(context); if (session == null) { return(null); } #if !RESHARPER_50_OR_NEWER || RESHARPER_60_OR_NEWER return(session.ID); #else // HACK: Get the last RunId for correlation instead of the SessionId because the SessionId is // not available to the task runner in R# 5.0 but the RunId is, so we use that for correlation. // Unfortunately runs are transient so they are deleted after tests finish. However before that // happens, the Update method will be called many times to update UI state so we should be able // to catch the run in flight and save it for later. // // I have asked JetBrains to provide SessionId info to TaskRunners in a future release // as it was done in R# 3.1. -- Jeff. foreach (IUnitTestRun run in session.Runs) { string runId = run.ID; LastRunIdCache[session.ID] = runId; return(runId); } string lastRunId; LastRunIdCache.TryGetValue(session.ID, out lastRunId); return(lastRunId); #endif }
public void ProfferConfiguration(TaskExecutorConfiguration configuration, UnitTestSession session) { }