private OnDemandRunInternal add(OnDemandRun run, IAutoTestNetTestRunner runner, IEnumerable<string> tests, IEnumerable<string> members, IEnumerable<string> namespaces)
 {
     if (alreadySetToTestAll(run))
         return null;
     var existing = _list.Where(x => x.Project.Equals(run.Project) && x.Runner.Equals(TestRunnerConverter.FromString(runner.Identifier))).FirstOrDefault();
     if (existing != null)
     {
         Logger.WriteDebug("Joining with existing run " + existing.Project + " with runner " + runner.Identifier);
         existing.JoinWith(tests, members, namespaces);
         return existing;
     }
     Logger.WriteDebug("Adding new run " + run.Project + " with runner " + runner.Identifier);
     var internalRun = new OnDemandRunInternal(TestRunnerConverter.FromString(runner.Identifier), run.Project, tests.ToArray(), members.ToArray(), namespaces.ToArray());
     _list.Add(internalRun);
     return _list[_list.Count - 1];
 }
        private OnDemandRunInternal add(OnDemandRun run, IAutoTestNetTestRunner runner, IEnumerable <string> tests, IEnumerable <string> members, IEnumerable <string> namespaces)
        {
            if (alreadySetToTestAll(run))
            {
                return(null);
            }
            var existing = _list.Where(x => x.Project.Equals(run.Project) && x.Runner.Equals(TestRunnerConverter.FromString(runner.Identifier))).FirstOrDefault();

            if (existing != null)
            {
                Logger.WriteDebug("Joining with existing run " + existing.Project + " with runner " + runner.Identifier);
                existing.JoinWith(tests, members, namespaces);
                return(existing);
            }
            Logger.WriteDebug("Adding new run " + run.Project + " with runner " + runner.Identifier);
            var internalRun = new OnDemandRunInternal(TestRunnerConverter.FromString(runner.Identifier), run.Project, tests.ToArray(), members.ToArray(), namespaces.ToArray());

            _list.Add(internalRun);
            return(_list[_list.Count - 1]);
        }