public RunnerServiceHandler(IStaticLoader loader, Server server) { _loader = loader; this._server = server; this._stepRegistry = loader.GetStepRegistry(); this.InitializeMessageProcessors(); }
public StaticLoader(IAttributesLoader attributesLoader, IDirectoryWrapper directoryWrapper) { _stepRegistry = new StepRegistry(); _attributesLoader = attributesLoader; _directoryWrapper = directoryWrapper; LoadImplementations(); }
public IMessageProcessor GetProcessor(Message.Types.MessageType messageType, bool scan = false) { if (!scan) { return(!_messageProcessorsDictionary.ContainsKey(messageType) ? new DefaultProcessor() : _messageProcessorsDictionary[messageType]); } var activatorWrapper = new ActivatorWrapper(); var reflectionWrapper = new ReflectionWrapper(); var assemblyLoader = new AssemblyLoader(new AssemblyWrapper(), new AssemblyLocater(new DirectoryWrapper(), new FileWrapper()).GetAllAssemblies(), reflectionWrapper); _stepRegistry = assemblyLoader.GetStepRegistry(); var tableFormatter = new TableFormatter(assemblyLoader, activatorWrapper); var classInstanceManager = assemblyLoader.GetClassInstanceManager(activatorWrapper); InitializeExecutionMessageHandlers(reflectionWrapper, assemblyLoader, activatorWrapper, tableFormatter, classInstanceManager); return(!_messageProcessorsDictionary.ContainsKey(messageType) ? new DefaultProcessor() : _messageProcessorsDictionary[messageType]); }
public ExecuteStepProcessor(IStepRegistry registry, IExecutionOrchestrator executionOrchestrator, ITableFormatter tableFormatter) { _stepRegistry = registry; _tableFormatter = tableFormatter; _executionOrchestrator = executionOrchestrator; }
public ExecuteStepProcessor(IStepRegistry stepRegistry, IMethodExecutor methodExecutor, ISandbox sandbox) { _stepRegistry = stepRegistry; _methodExecutor = methodExecutor; _sandbox = sandbox; InitializeConverter(); }
private void InitializeExecutionMessageHandlers() { var activatorWrapper = new ActivatorWrapper(); var reflectionWrapper = new ReflectionWrapper(); var assemblies = new AssemblyLocater(new DirectoryWrapper(), new FileWrapper()).GetAllAssemblies(); var assemblyLoader = new AssemblyLoader(new AssemblyWrapper(), assemblies, reflectionWrapper, activatorWrapper); _stepRegistry = assemblyLoader.GetStepRegistry(); var tableFormatter = new TableFormatter(assemblyLoader, activatorWrapper); var classInstanceManager = assemblyLoader.GetClassInstanceManager(); var executionOrchestrator = new ExecutionOrchestrator(reflectionWrapper, assemblyLoader, activatorWrapper, classInstanceManager, new HookExecutor(assemblyLoader, reflectionWrapper, classInstanceManager), new StepExecutor(assemblyLoader, reflectionWrapper, classInstanceManager)); this.executionStartingProcessor = new ExecutionStartingProcessor(executionOrchestrator); this.executionEndingProcessor = new ExecutionEndingProcessor(executionOrchestrator); this.specExecutionStartingProcessor = new SpecExecutionStartingProcessor(executionOrchestrator); this.specExecutionEndingProcessor = new SpecExecutionEndingProcessor(executionOrchestrator); this.scenarioExecutionStartingProcessor = new ScenarioExecutionStartingProcessor(executionOrchestrator); this.scenarioExecutionEndingProcessor = new ScenarioExecutionEndingProcessor(executionOrchestrator); this.stepExecutionStartingProcessor = new StepExecutionStartingProcessor(executionOrchestrator); this.stepExecutionEndingProcessor = new StepExecutionEndingProcessor(executionOrchestrator); this.executeStepProcessor = new ExecuteStepProcessor(_stepRegistry, executionOrchestrator, tableFormatter); this.scenarioDataStoreInitProcessor = new ScenarioDataStoreInitProcessor(assemblyLoader); this.specDataStoreInitProcessor = new SpecDataStoreInitProcessor(assemblyLoader); this.suiteDataStoreInitProcessor = new SuiteDataStoreInitProcessor(assemblyLoader); }
public AuthoringRunnerServiceHandler(IStaticLoader loader, ExecutorPool pool, IHostApplicationLifetime lifetime) { this._pool = pool; this.lifetime = lifetime; this._loader = loader; _stepRegistry = loader.GetStepRegistry(); this.InitializeMessageProcessors(); }
public RunnerServiceHandler(IActivatorWrapper activationWrapper, IReflectionWrapper reflectionWrapper, IAssemblyLoader assemblyLoader, IStaticLoader loader, Server server) { this._loader = loader; this._server = server; this._activatorWrapper = activationWrapper; this._reflectionWrapper = reflectionWrapper; this._assemblyLoader = assemblyLoader; _stepRegistry = assemblyLoader.GetStepRegistry(); this.InitializeMessageProcessors(); }
public AssemblyLoader(AssemblyPath assemblyPath, IGaugeLoadContext gaugeLoadContext, IReflectionWrapper reflectionWrapper, IActivatorWrapper activatorWrapper, IStepRegistry registry) { _reflectionWrapper = reflectionWrapper; _activatorWrapper = activatorWrapper; AssembliesReferencingGaugeLib = new List <Assembly>(); _registry = registry; Logger.Debug($"Loading assembly from : {assemblyPath}"); _gaugeLoadContext = gaugeLoadContext; this._targetLibAssembly = _gaugeLoadContext.LoadFromAssemblyName(new AssemblyName(GaugeLibAssemblyName)); ScanAndLoad(assemblyPath); AssembliesReferencingGaugeLib = _gaugeLoadContext.GetAssembliesReferencingGaugeLib().ToList(); Logger.Debug($"Number of AssembliesReferencingGaugeLib : {AssembliesReferencingGaugeLib.Count()}"); SetDefaultTypes(); }
public AssemblyLoader(IAssemblyWrapper assemblyWrapper, IEnumerable <string> assemblyLocations, IReflectionWrapper reflectionWrapper, IActivatorWrapper activatorWrapper, IStepRegistry registry) { _assemblyWrapper = assemblyWrapper; _reflectionWrapper = reflectionWrapper; _activatorWrapper = activatorWrapper; AssembliesReferencingGaugeLib = new List <Assembly>(); _registry = registry; foreach (var location in assemblyLocations) { ScanAndLoad(location); } LoadTargetLibAssembly(); SetDefaultTypes(); }
private Dictionary <Message.Types.MessageType, IMessageProcessor> InitializeMessageHandlers( IStepRegistry stepRegistry) { var methodExecutor = new MethodExecutor(_sandbox); var messageHandlers = new Dictionary <Message.Types.MessageType, IMessageProcessor> { { Message.Types.MessageType.ExecutionStarting, new ExecutionStartingProcessor(methodExecutor) }, { Message.Types.MessageType.ExecutionEnding, new ExecutionEndingProcessor(methodExecutor) }, { Message.Types.MessageType.SpecExecutionStarting, new SpecExecutionStartingProcessor(methodExecutor, _sandbox) }, { Message.Types.MessageType.SpecExecutionEnding, new SpecExecutionEndingProcessor(methodExecutor, _sandbox) }, { Message.Types.MessageType.ScenarioExecutionStarting, new ScenarioExecutionStartingProcessor(methodExecutor, _sandbox) }, { Message.Types.MessageType.ScenarioExecutionEnding, new ScenarioExecutionEndingProcessor(methodExecutor, _sandbox) }, { Message.Types.MessageType.StepExecutionStarting, new StepExecutionStartingProcessor(methodExecutor) }, { Message.Types.MessageType.StepExecutionEnding, new StepExecutionEndingProcessor(methodExecutor) }, { Message.Types.MessageType.ExecuteStep, new ExecuteStepProcessor(stepRegistry, methodExecutor) }, { Message.Types.MessageType.KillProcessRequest, new KillProcessProcessor() }, { Message.Types.MessageType.StepNamesRequest, new StepNamesProcessor(_stepScanner) }, { Message.Types.MessageType.StepValidateRequest, new StepValidationProcessor(stepRegistry) }, { Message.Types.MessageType.ScenarioDataStoreInit, new ScenarioDataStoreInitProcessor(_sandbox) }, { Message.Types.MessageType.SpecDataStoreInit, new SpecDataStoreInitProcessor(_sandbox) }, { Message.Types.MessageType.SuiteDataStoreInit, new SuiteDataStoreInitProcessor(_sandbox) }, { Message.Types.MessageType.StepNameRequest, new StepNameProcessor(stepRegistry) }, { Message.Types.MessageType.RefactorRequest, new RefactorProcessor(stepRegistry, _sandbox) } }; return(messageHandlers); }
public StepNameProcessor(IStepRegistry stepRegistry) { _stepRegistry = stepRegistry; }
public StepValidationProcessor(IStepRegistry stepRegistry) { _stepRegistry = stepRegistry; }
public MessageProcessorFactory(IStepRegistry registry) { _stepRegistry = registry; _messageProcessorsDictionary = InitializeMessageHandlers(); }
public StaticLoader() { _stepRegistry = new StepRegistry(); }
public RefactorProcessor(IStepRegistry stepRegistry, ISandbox sandbox) { _stepRegistry = stepRegistry; _sandbox = sandbox; }
public MessageProcessorFactory(IStaticLoader loader) { _loader = loader; _stepRegistry = loader.GetStepRegistry(); _messageProcessorsDictionary = InitializeMessageHandlers(); }
public RefactorProcessor(IStepRegistry stepRegistry) { _stepRegistry = stepRegistry; }
public ExecuteStepProcessor(IStepRegistry stepRegistry, IMethodExecutor methodExecutor, ITableFormatter tableFormatter) { _tableFormatter = tableFormatter; _stepRegistry = stepRegistry; _methodExecutor = methodExecutor; }
public StepPositionsProcessor(IStepRegistry stepRegistry) { _stepRegistry = stepRegistry; }
public StepValidationProcessor(IStepRegistry stepMethodTable) { _stepMethodTable = stepMethodTable; }
public StaticLoader(IAttributesLoader attributesLoader) { _stepRegistry = new StepRegistry(); _attributesLoader = attributesLoader; }
public ExecuteStepProcessor(IStepRegistry stepRegistry, IMethodExecutor methodExecutor) { _stepRegistry = stepRegistry; _methodExecutor = methodExecutor; InitializeConverter(); }
public ExecuteStepProcessor(IStepRegistry stepRegistry, IMethodExecutor methodExecutor) { _stepRegistry = stepRegistry; _methodExecutor = methodExecutor; }