Component evidence

Workflow Scope Provider (Services/ScopeProvider.cs)

workflow-core · src/WorkflowCore/Services/ScopeProvider.cs · csharp · MIT
automationlang:csharptag:ditag:services

A service provider that manages dependency injection scopes for workflow execution. Use this to ensure proper resource lifecycle management during step execution.

Source preview first 800 characters · full source over MCP
// Source: https://github.com/danielgerlag/workflow-core | License: MIT | Copyright 2016 Daniel Gerlag
// Provided via justclaw.it.com; keep this notice with the code.
using Microsoft.Extensions.DependencyInjection;
using System;
using WorkflowCore.Interface;

namespace WorkflowCore.Services
{
    /// <summary>
    /// A concrete implementation for the IScopeProvider interface
    /// Could be used for context-aware scope creation customization
    /// </summary>
    public class ScopeProvider : IScopeProvider
    {
        private readonly IServiceScopeFactory _serviceScopeFactory;

        public ScopeProvider(IServiceScopeFactory serviceScopeFactory)
        {
            _serviceScopeFactory = serviceScopeFactory;
        }

        public IServiceScope CreateScope(IStepExecutionConte

... (truncated -- full source via MCP)