public async Task ProcessIssue(int id) { await masterRepository.Initialize(); using (var repositoryContext = await masterRepository.CreateContext(id)) { var schemaFilePath = Path.Combine(repositoryContext.RepositoryDirectory, "websites_schema.yml"); ISchemaItem schema; using (var schemaFileStream = new FileStream(schemaFilePath, FileMode.Open)) { using (var streamReader = new StreamReader(schemaFileStream)) { schema = schemaLoader.LoadSchema(streamReader); } } var merchantDetailsOption = await merchantDetailsLoader.ExtractDetails(schema, id); var merchantDetails = merchantDetailsOption.ValueOrFailure(); var pipelineContext = new PipelineContext(id, merchantDetails, repositoryContext, schema); var pipeline = ABCPipelineFactory.BuildStandardPipeline(pipelineContext, serviceProvider); Log.Information("Starting pipeline for id: {id}", id); var result = await pipeline.Process(); Log.Information("Pipeline completed: {result}", result); } }