TaskGate.Oracle 1.0.3

dotnet add package TaskGate.Oracle --version 1.0.3
                    
NuGet\Install-Package TaskGate.Oracle -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TaskGate.Oracle" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TaskGate.Oracle" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="TaskGate.Oracle" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TaskGate.Oracle --version 1.0.3
                    
#r "nuget: TaskGate.Oracle, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TaskGate.Oracle@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TaskGate.Oracle&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=TaskGate.Oracle&version=1.0.3
                    
Install as a Cake Tool

TaskGate

TaskGate is an execution library designed for high-throughput parallel task processing in .NET. It provides thread-safe DbContext usage, coordinated concurrency limits, and deterministic task execution without requiring any external queueing system.

Highlights

  • Configurable parallelism and queue thresholds
  • Robust retry and timeout policies
  • Extensible provider model for multiple data stores
  • Isolated DbContext management to avoid cross-task interference

Installation

# Core building blocks
 dotnet add package TaskGate.Core

# Oracle provider
 dotnet add package TaskGate.Oracle

# SQL Server provider
 dotnet add package TaskGate.SqlServer

Quick Start

var builder = WebApplication.CreateBuilder(args);
var services = builder.Services;

services.AddOracleTaskGate<MyAppContext>(
    connectionString: builder.Configuration.GetConnectionString("TaskGate"),
    options =>
    {
        options.MaxParallelism = 8;
        options.MaxQueueSize = 500;
        options.TaskTimeout = TimeSpan.FromMinutes(5);
    });

var app = builder.Build();
app.Run();

Usage

Simple usage

  1. Model a work item (SampleTask) that represents the payload you want to process.
  2. Register TaskGate services in your DI container and inject ITaskGateRuntime<TContext> where you will orchestrate jobs.
  3. Run a batch by passing tasks and a lightweight handler that receives the scoped DbContext, any shared HTTP services, and the current task. The following example shows how TaskGate scopes each execution with a DbContext and lets you compose data access alongside custom logic:
internal class ExampleClass
{
    private readonly ITaskGateRuntime<SampleDbContext> _taskGate;

    public ExampleClass(ITaskGateRuntime<SampleDbContext> taskGate)
    {
        _taskGate = taskGate;
    }

    public async Task SampleMethod(CancellationToken ct)
    {
        var taskList = Enumerable.Range(1, 5)
                             .Select(x => new SampleTask { Id = x })
                             .ToList();

        await _taskGate.Run(
            taskList,
            async (db, http, task, token) =>
            {
                Console.WriteLine($"Task {task.Id} - DbContext Hash: {db.GetHashCode()}");

                var companies = await db.Company
                    .AsNoTracking()
                    .Take(10)
                    .ToListAsync(token);

                Console.WriteLine($"Task {task.Id} → {companies.Count}");
            },
            ct
        );
    }
}

Architecture Snapshot

TaskGate centralizes queueing, leasing, and concurrency coordination in the TaskGate.Core package. Provider packages (Oracle, SQL Server) deliver data-source specific infrastructure while sharing the same leasing and retry primitives. Applications opt into the provider they need and compose TaskGate services through familiar dependency injection patterns.

Provider Layout

  • TaskGate.Core – contracts, queue orchestration, concurrency limits, retry policies
  • TaskGate.Oracle – Oracle provider implementation and specialized TaskGateRetryPolicy
  • TaskGate.SqlServer – SQL Server provider implementation with pooled leasing integration
  • Extend the abstractions in TaskGate.Core to add your own provider and wire up database operations.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 175 11/7/2025
1.0.2 169 11/7/2025
1.0.1 171 11/7/2025
1.0.0 190 11/7/2025