GuiDispatcher.Sharp 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package GuiDispatcher.Sharp --version 1.1.0
                    
NuGet\Install-Package GuiDispatcher.Sharp -Version 1.1.0
                    
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="GuiDispatcher.Sharp" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GuiDispatcher.Sharp" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="GuiDispatcher.Sharp" />
                    
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 GuiDispatcher.Sharp --version 1.1.0
                    
#r "nuget: GuiDispatcher.Sharp, 1.1.0"
                    
#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 GuiDispatcher.Sharp@1.1.0
                    
#: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=GuiDispatcher.Sharp&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=GuiDispatcher.Sharp&version=1.1.0
                    
Install as a Cake Tool

GuiDispatcher.Sharp

Platform-agnostic GUI dispatcher and timer abstractions for .NET 10.

Use this package from view models, services, debouncers, and other code that needs to marshal work back to a GUI/main thread without referencing a UI framework directly.

Install

<PackageReference Include="GuiDispatcher.Sharp" Version="1.1.*" />

Or via CLI:

dotnet add package GuiDispatcher.Sharp

Versioning follows Semantic Versioning. Releases are cut by pushing a vX.Y.Z git tag; see CHANGELOG.md for release history.

Requirements

  • .NET 10 (net10.0)

NuGet publishing

Publishing uses NuGet Trusted Publishing from GitHub Actions, not a stored API key.

Configure a trusted publishing policy on nuget.org:

Field Value
Repository owner buchmiet
Repository GuiDispatcher.Sharp
Workflow file publish-nuget.yml
Environment production

Releasing

The Publish NuGet workflow only runs on vX.Y.Z tag pushes, and will fail unless the .csproj version and CHANGELOG.md are both updated first. To cut a release:

  1. Bump <Version> in GuiDispatcher.Sharp.csproj.
  2. Move the relevant [Unreleased] entries in CHANGELOG.md into a new ## [X.Y.Z] - YYYY-MM-DD section.
  3. Commit both changes.
  4. Tag and push: git tag vX.Y.Z && git push origin vX.Y.Z — this triggers the publish workflow.

Contracts

Interfaces are in the GuiDispatcher.Sharp.Contracts namespace:

using GuiDispatcher.Sharp.Contracts;

public interface IGuiDispatcher
{
    bool CheckAccess();
    void Post(Action action);
    void Invoke(Action action);
    Task InvokeAsync(Action action);
    Task InvokeAsync(Func<Task> action);
    T Invoke<T>(Func<T> func);
    IGuiTimer CreateTimer(TimeSpan interval);
    IDisposable RunOnce(Action action, TimeSpan interval);
}

IGuiTimer exposes Tick, Interval, IsEnabled, Start, Stop, and Dispose.

Headless/default implementation

using GuiDispatcher.Sharp;
using GuiDispatcher.Sharp.Contracts;

IGuiDispatcher dispatcher = new ImmediateGuiDispatcher();

await dispatcher.InvokeAsync(() =>
{
    viewModel.Apply(result);
});

ImmediateGuiDispatcher executes posted/invoked work inline. Its timers use System.Threading.Timer and marshal ticks through Post, which keeps tests and console hosts deterministic enough without a GUI framework dependency.

UI implementations

Install a platform adapter package for GUI applications:

<PackageReference Include="GuiDispatcher.Sharp.Avalonia" Version="1.1.*" />

WinUI 3 support is planned separately.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.
  • net10.0

    • No dependencies.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on GuiDispatcher.Sharp:

Package Downloads
Debouncer.Sharp

Thread-safe debounce primitives for delayed, coalesced async work.

GuiDispatcher.Sharp.Avalonia

Avalonia 12 implementation of GuiDispatcher.Sharp for .NET 10.

GuiDispatcher.Sharp.Maui

.NET MAUI 10 implementation of GuiDispatcher.Sharp for .NET 10.

GuiDispatcher.Sharp.Consolonia

Consolonia 11 implementation of GuiDispatcher.Sharp for .NET 10.

GuiDispatcher.Sharp.WinUI

WinUI 3 implementation of GuiDispatcher.Sharp for .NET 10 and Windows App SDK 2.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 166 7/24/2026
1.1.0 167 7/10/2026
1.0.2 195 7/1/2026
1.0.1 144 7/1/2026