private void NotifyResharperOfBackgroundResult(ScenarioResult scenarioResult) { if (scenarioResult.HasBackgroundResults() == false) { return; } var backgroundTasks = GetTaskNodesNotStarted <NBehaveBackgroundTask>() .Where(_ => ((NBehaveBackgroundTask)_.Task).Scenario == scenarioResult.ScenarioTitle); var backgroundResult = GetBackgroundStepResult(scenarioResult); foreach (var backgroundTask in backgroundTasks) { backgroundTask.State = SignalState.Finished; NotifyResharperOfTaskResult(scenarioResult, backgroundResult, backgroundTask); } }