public DefaultRunner(ISpecificationRunListener listener, RunOptions options)
    {
      _listener = listener;
      _options = options;
      _assemblyRunner = new AssemblyRunner(_listener, _options);

      _explorer = new AssemblyExplorer();

      _runStart = () => _listener.OnRunStart();
      _runEnd = () => _listener.OnRunEnd();
    }
        public DefaultRunner(ISpecificationRunListener listener, RunOptions options, bool signalRunStartAndEnd)
        {
            _listener = listener;
            _options = options;
            _assemblyRunner = new AssemblyRunner(_listener, _options);

            _explorer = new AssemblyExplorer();

            if (signalRunStartAndEnd)
            {
                _runStart = new InvokeOnce(() => _listener.OnRunStart());
                _runEnd = new InvokeOnce(() => _listener.OnRunEnd());
            }
        }
        public DefaultRunner(ISpecificationRunListener listener, RunOptions options, bool signalRunStartAndEnd)
        {
            this.listener = listener;
            this.options  = options;

            assemblyRunner = new AssemblyRunner(this.listener, this.options);

            explorer = new AssemblyExplorer();

            if (signalRunStartAndEnd)
            {
                runStart = new InvokeOnce(() => this.listener.OnRunStart());
                runEnd   = new InvokeOnce(() => this.listener.OnRunEnd());
            }
        }
 void StartAssemblyRun(Assembly assembly, IEnumerable<Context> contexts)
 {
   var runner = new AssemblyRunner(_listener, _options);
   runner.Run(assembly, contexts.FilteredBy(_options));
 }