Soenneker.Blazor.Extensions.EventCallback 11.0.474

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Blazor.Extensions.EventCallback

Small Blazor extensions that invoke an EventCallback only when its consumer assigned a delegate.

Installation

dotnet add package Soenneker.Blazor.Extensions.EventCallback

Usage

The extension removes repeated HasDelegate checks from reusable components:

@using Soenneker.Blazor.Extensions.EventCallback

<button @onclick="Save">Save</button>

@code {
    [Parameter]
    public EventCallback<Order> OnSaved { get; set; }

    private async Task Save()
    {
        Order order = await SaveOrder();
        await OnSaved.InvokeIfHasDelegate(order);
    }
}

The non-generic overload works the same way:

[Parameter]
public EventCallback OnClosed { get; set; }

await OnClosed.InvokeIfHasDelegate();

When no delegate is assigned, both overloads return Task.CompletedTask. When a delegate is assigned, invocation follows normal Blazor EventCallback.InvokeAsync behavior, including renderer dispatch and exception propagation. Await the returned task when subsequent work depends on the callback completing.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on Soenneker.Blazor.Extensions.EventCallback:

Package Downloads
Soenneker.Blazor.TomSelect

A Blazor interop library for the select user control library, Tom Select

Soenneker.Blazor.Turnstile

Renders a Cloudflare Turnstile widget in Blazor and exposes its token and lifecycle events.

Soenneker.Blazor.Stripe.Elements

A modular, strongly-typed Blazor library for Stripe Elements

Soenneker.Blazor.Chatwoot

A Blazor interop library for Chatwoot, the open-source customer engagement suite.

Soenneker.Blazor.Floating.Tooltips

A Blazor interop library using the modern library, floating-ui, for tooltips

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.476 2,297 11/11/2026
11.0.475 449 11/10/2026
11.0.474 11,159 10/26/2026
4.0.473 909 10/25/2026
4.0.472 7,446 10/14/2026
4.0.471 571 10/14/2026
4.0.470 104 10/14/2026
4.0.465 1,093 10/12/2026
4.0.464 1,446 10/12/2026
4.0.463 1,928 10/11/2026
4.0.462 14,176 9/24/2026
4.0.461 5,610 9/15/2026
4.0.460 5,499 9/12/2026
4.0.459 3,236 9/8/2026
4.0.458 12,629 8/29/2026
4.0.457 276 8/29/2026
4.0.456 9,375 8/11/2026
4.0.455 10,308 7/27/2026
4.0.454 11,137 7/16/2026
4.0.453 2,990 7/14/2026
Loading failed

Migrate to .NET 11 and version 11