public static void SetObserver(IExecutionObserver observer) { _observer = observer; #if DEBUG ExecutionObserverDebugger.Test(_observer); #endif }
public SpecificationEngine(ISystem system, ISpecRunner runner, IExecutionObserver observer) { _system = system; _runner = runner; _executionQueue = new ConsumingQueue(request => { if (request.IsCancelled) { return; } _warmup.Wait(30.Seconds()); observer.SpecStarted(request); var results = _runner.Execute(request, _executionQueue); if (!request.IsCancelled && results != null) { // TODO -- combine the two things here? request.SpecExecutionFinished(results); observer.SpecFinished(request); } }); _warmup = _system.Warmup().ContinueWith(t => { if (t.IsFaulted) { _runner.MarkAsInvalid(t.Exception); } }); }
public SpecificationEngine(ISystem system, ISpecRunner runner, IExecutionObserver observer) { _system = system; _runner = runner; _executionQueue = new ConsumingQueue(request => { if (request.IsCancelled) { return; } _warmup.Wait(30.Seconds()); observer.SpecStarted(request); var results = _runner.Execute(request, _executionQueue ); if (!request.IsCancelled && results != null) { // TODO -- combine the two things here? request.SpecExecutionFinished(results); observer.SpecFinished(request); } }); _warmup = _system.Warmup().ContinueWith(t => { if (t.IsFaulted) { _runner.MarkAsInvalid(t.Exception); } }); }
public SpecificationEngine(ISystem system, ISpecRunner runner, IExecutionObserver observer) { if (system == null) { throw new ArgumentNullException(nameof(system)); } if (runner == null) { throw new ArgumentNullException(nameof(runner)); } if (observer == null) { throw new ArgumentNullException(nameof(observer)); } _system = system; _runner = runner; _executionQueue = new ConsumingQueue(request => { if (request.IsCancelled) { return; } _warmup.Wait(30.Seconds()); var results = _runner.Execute(request, _executionQueue); if (!request.IsCancelled && (results != null)) { // TODO -- combine the two things here? request.SpecExecutionFinished(results); observer.SpecFinished(request); } }); var warmup = _system.Warmup(); if (warmup == null) { throw new InvalidOperationException($"{system} cannot return a null value from {nameof(ISystem.Warmup)}()"); } if (warmup.Status == TaskStatus.WaitingForActivation) { warmup.Start(); } _warmup = warmup.ContinueWith(t => { if (t.IsFaulted) { _runner.MarkAsInvalid(t.Exception); } }); }
public SpecRunner(IExecutionMode mode, ISystem system, IExecutionObserver observer) { _mode = mode; _system = system; _observer = observer; Status = SpecRunnerStatus.Valid; }
public ResumeAfterWorkflowExecutor( Execution <TContext> execution, TContext context, INodesResolver <TContext> nodes, IActivityFactory factory, IExecutionObserver observer, IActivityOutputProvider outputProvider) : base(execution, context, nodes, factory, observer) { m_OutputProvider = outputProvider; }
public Workflow( string name, IWorkflowPersister <TContext> persister, IActivityFactory activityFactory = null, IExecutionObserver executionObserver = null) : this( persister, activityFactory, executionObserver) { Name = name ?? throw new ArgumentNullException(nameof(name)); }
protected WorkflowExecutorBase( Execution <TContext> execution, TContext context, INodesResolver <TContext> nodes, IActivityFactory factory, IExecutionObserver observer) { m_ExecutionObserver = observer ?? new NullExecutionObserver(); m_Context = context; Factory = factory; m_Execution = execution; m_Nodes = nodes; }
protected WorkflowExecutorBase( Execution execution, TContext context, Workflow <TContext> workflow, IActivityFactory factory, IExecutionObserver observer) { m_ExecutionObserver = observer ?? new NullExecutionObserver(); m_Context = context; Factory = factory; m_Execution = execution; _workflow = workflow; _workflowTypeName = _workflow.GetType().Name; }
public WorkflowExecutor( Execution execution, TContext context, Workflow <TContext> workflow, IActivityFactory factory, IExecutionObserver observer) : base( execution, context, workflow, factory, observer) { }
public WorkflowExecutor( Execution <TContext> execution, TContext context, INodesResolver <TContext> nodes, IActivityFactory factory, IExecutionObserver observer) : base( execution, context, nodes, factory, observer) { }
public Workflow( IWorkflowPersister <TContext> persister, IActivityFactory activityFactory = null, IExecutionObserver executionObserver = null) { m_ExecutionObserver = executionObserver; m_ActivityFactory = activityFactory ?? this; m_Persister = persister; m_Start = new GraphNode <TContext>("start"); m_End = new GraphNode <TContext>("end"); m_Fail = new GraphNode <TContext>("fail"); RegisterNode(m_Start); RegisterNode(m_End); RegisterNode(m_Fail); }
public ResumeAfterWorkflowExecutor( Execution execution, TContext context, Workflow <TContext> workflow, IActivityFactory factory, IExecutionObserver observer, IActivityOutputProvider outputProvider) : base( execution, context, workflow, factory, observer) { m_OutputProvider = outputProvider; }
public ResumeFromWorkflowExecutor( Execution <TContext> execution, TContext context, INodesResolver <TContext> nodes, IActivityFactory factory, IExecutionObserver observer, object input) : base( execution, context, nodes, factory, observer) { m_Input = input; }
public ResumeFromWorkflowExecutor( Execution execution, TContext context, Workflow <TContext> workflow, IActivityFactory factory, IExecutionObserver observer, object input) : base( execution, context, workflow, factory, observer) { m_Input = input; }
public ResumeWorkflowExecutor( Execution <TContext> execution, TContext context, INodesResolver <TContext> nodes, IActivityFactory factory, IExecutionObserver observer, ActivityExecution resumingActivityExecution, object closure) : base( execution, context, nodes, factory, observer) { m_ResumingActivityExecution = resumingActivityExecution; m_Closure = closure; }
public ResumeWorkflowExecutor( Execution execution, TContext context, Workflow <TContext> workflow, IActivityFactory factory, IExecutionObserver observer, ActivityExecution resumingActivityExecution, object closure) : base( execution, context, workflow, factory, observer) { m_ResumingActivityExecution = resumingActivityExecution; m_Closure = closure; }
private void buildExecutionQueue(SpecRunner runner, IExecutionObserver executionObserver) { _queue = new ConsumingQueue(request => { if (request.IsCancelled) { return; } var results = runner.Execute(request, _queue); if (!request.IsCancelled && results != null) { // TODO -- combine the two things here? request.SpecExecutionFinished(results); executionObserver.SpecFinished(request); } }); _queue.Start(); }
internal void SetExecutionObserver(IExecutionObserver observer) { _methodSetExecutionObserver?.Invoke(observer); }
internal void SetExecutionObserver(IExecutionObserver observer) { _methodInfos[nameof(ExecutionObserverProxy.SetObserver)] ?.Invoke(null, new object[] { observer }); }
private static SpecRunner buildRunner(RunInput input, List <Specification> specs, RunningSystem running, out IExecutionObserver executionObserver) { IBatchObserver batchObserver = new NulloBatchObservor(); executionObserver = new NulloObserver(); switch (input.TracingFlag) { case TracingStyle.verbose: batchObserver = new ConsoleBatchObserver(specs.Count); // TODO -- awesome if you could get smarter w/ the console output here break; case TracingStyle.teamcity: batchObserver = new TeamCityBatchObserver(); executionObserver = new TeamCityExecutionObserver(); break; case TracingStyle.appveyor: batchObserver = new AppVeyorBatchObserver(); break; } return(new SpecRunner(new BatchExecutionMode(batchObserver), running.System, executionObserver)); }
public StepthroughExecution(SpecExecutionRequest request, StopConditions stopConditions, IUserInterfaceObserver observer, IExecutionObserver executionObserver) : base(request, stopConditions, new InstrumentedLogger(observer)) { _observer = observer; _executionObserver = executionObserver; }
public static void Test(IExecutionObserver observer) { // To observe the observer's condition during execution, // can place a breakpoint below }
public static void SetObserver(IExecutionObserver observer) { _observer = observer; }