Aspetta 1.0.1-beta-debug

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

Aspetta

Aspetta is a minimal .NET micro-library for debouncing and coalescing frequent triggers — ideal for delaying expensive or redundant operations like network syncs, UI updates, or event dispatches.


✨ Features

  • Delay execution after a trigger
  • Coalesce rapid triggers into a single execution
  • Optional max delay span or trigger count limits
  • Synchronous or asynchronous usage
  • Runs on Task or dedicated thread
  • Lightweight and dependency-free

❔ But Why?

Aspetta is perfect when:

  • You need to debounce noisy events (file watchers, UI events, sensors)
  • You want to batch changes and apply them all at once
  • You need throttle-like control with clear limits

Quick Example


//first and only execution will happen after about 1.5s
var delay = Defer
    .ToExecute(() => Console.WriteLine("Action executed!"))
    .ForAtLeast(500)
    .Build();

// Simulate a burst of triggers
for (int i = 0; i < 10; i++)
{
    delay.Trigger();
    Thread.Sleep(100);
}

This will only print once, about 500ms after the last trigger.

⏱ Limit Options

You can configure:

  • MaximumDelaySpan: max total delay allowed,
  • MaximumTriggerCount: max triggers before forced execution,
  • or you can have both!
var delay = Defer
    .ToExecute(SaveData)
    .ForAtLeast(1000)
    .WithMaximumDelay(20000)
    .WithMaximumTriggerLimit(5)
    .Build();

🧵 Threading Options

You can choose whether the delay logic runs on:

  • A background Task (default)
  • A dedicated thread
var delay = Defer
    .UsingDedicatedThread()
    .ToExecute(ProcessBatch)
    .ForAtLeast(200)
    .Build();

📦 Install

Available on NuGet:

dotnet add package Aspetta

📜 License and credits

Aspetta is released under Apache 2.0

The project icon (also used for the NuGet package) was designed by Freepik

Contributions are welcome.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.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.1-beta-debug 70 4/2/2026
1.0.1-beta 71 4/2/2026
1.0.0-beta-debug 157 10/9/2025
1.0.0-beta 153 10/9/2025
0.9.0-Alpha 173 4/28/2025