TaskRunnerSharp 1.0.5

dotnet add package TaskRunnerSharp --version 1.0.5
                    
NuGet\Install-Package TaskRunnerSharp -Version 1.0.5
                    
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="TaskRunnerSharp" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TaskRunnerSharp" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="TaskRunnerSharp" />
                    
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 TaskRunnerSharp --version 1.0.5
                    
#r "nuget: TaskRunnerSharp, 1.0.5"
                    
#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 TaskRunnerSharp@1.0.5
                    
#: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=TaskRunnerSharp&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=TaskRunnerSharp&version=1.0.5
                    
Install as a Cake Tool

TaskRunnerSharp

NuGet
License

✨ Overview

TaskRunnerSharp is a minimalistic library that makes it easy to manage, run, and monitor multiple asynchronous or synchronous tasks, with built-in logging and result aggregation.

Whether you're handling fire-and-forget jobs or collecting results from parallel computations, TaskRunnerSharp provides a clean, reliable API.

📦 Installation

Install via NuGet Package Manager:

dotnet add package TaskRunnerSharp

Or via Visual Studio ➔ Manage NuGet Packages ➔ Search for TaskRunnerSharp.

🚀 Features

  • Manage and orchestrate multiple tasks (Task and Task<T>).
  • Collect results from successfully completed typed tasks.
  • Execute tasks synchronously or asynchronously (Run / RunAsync).
  • Thread-safe internal operations.
  • Built-in execution logging (tasks added, started, completed, or failed).
  • Easy to reset with Clear().

⚡ Quick Start

using TaskRunnerSharp;

var runner = new TaskRunner();

// Add tasks
runner.Add(() => Console.WriteLine("Running Action 1"));
runner.Add(() => 123);
runner.Add(() => "Hello TaskRunnerSharp!");

// Run all tasks
runner.Run(); // or await runner.RunAsync();

// Access typed task results
foreach (var result in runner.Results)
{
    Console.WriteLine($"Result: {result}");
}

// View logs
foreach (var log in runner.Logs)
{
    Console.WriteLine(log);
}

// Clear all tasks
runner.Clear();

📄 Overview

Method / Property Description
Add(Action) Adds an action.
Add<T>(Func<T>) Adds a func (returns a value).
Add(Task) Adds a non-returning task.
Add<T>(Task<T>) Adds a typed task that returns a value.
Run() Runs all tasks synchronously.
RunAsync() Runs all tasks asynchronously.
Results Retrieves a list of results from successfully completed typed tasks.
Logs Retrieves execution logs.
Clear() Removes all stored tasks and logs the operation.

📝 License

This project is licensed under the MIT License.

TaskRunnerSharp — keeping your parallelism simple and reliable.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.
  • net8.0

    • No dependencies.

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.5 192 5/1/2025
1.0.4 151 5/1/2025
1.0.3 154 4/28/2025
1.0.2 156 4/28/2025
1.0.1 154 4/28/2025
1.0.0 152 4/28/2025