* Restructuring (WIP) * Fix warnings * Move DSL to modules * Update namespaces * Make design factory base reusable * Update service registrations * Remove unused namespaces and rename ElsaDbContext * Incremental work on migrations * Generate WorkflowsDbContext SQLite migrations * Rename ServiceCollectionExtensions * Update DbContextOptionsBuilderExtensions.cs * Restructure * Configuration refactorings (WIP) * Incremental work on configurator API * Incremental work on configuration API * Incremental work on configuration API * Fix workflow runtime options * Move standard stream providers * Implement configurator dependencies * Cleanup configurator API * Update configurator dependencies * Cleanup * Update Label API endpoints * Fix eager configuration issue
19 lines
566 B
C#
19 lines
566 B
C#
using System;
|
|
using System.Threading;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Elsa.Jobs.Models;
|
|
|
|
public class JobExecutionContext
|
|
{
|
|
public JobExecutionContext(IServiceProvider serviceProvider, CancellationToken cancellationToken)
|
|
{
|
|
ServiceProvider = serviceProvider;
|
|
CancellationToken = cancellationToken;
|
|
}
|
|
|
|
public IServiceProvider ServiceProvider { get; }
|
|
public CancellationToken CancellationToken { get; }
|
|
|
|
public T GetRequiredService<T>() where T : notnull => ServiceProvider.GetRequiredService<T>();
|
|
} |