EricksonLopez.Events

dotnet-events · Messaging & Events

On this page (20 sections)

1. Identity, Tier & Maturity Profile#

L0 Foundation PrimitivesStableMaintenance: ActiveAOT: FullMIT LicenseConfidence: HIGH
DomainApplicationnet8.0net9.0net10.0

2. Value Proposition & Problem Solved#

Event contracts and primitives for building decoupled, event-driven .NET applications, designed for trimming and Native AOT

Reflection-heavy mediator and event-bus libraries allocate heap delegates and header dictionaries on every dispatch, introducing GC pressure and breaking trimming.

3. Quick Install#

Primary package: EricksonLopez.Events

dotnet add package EricksonLopez.Events --version 2.0.0
Also published in this family:
EricksonLopez.Events.ContractsEricksonLopez.Events.TestingEricksonLopez.Events.Serialization.SystemTextJsonEricksonLopez.Events.CloudEventsEricksonLopez.Events.OpenTelemetryEricksonLopez.Events.Generators

4. Verified Ecosystem Metrics#

v2.0.0
NuGet Published Version
v2.0.0
Repo HEAD Version
6,051
NuGet Downloads
7
Packable Packages
381
Public API Members
13
Benchmark Rows (RyuJIT)

Snapshot retrieved UTC: 2026-12-01

5. When to Use & When Not to Use#

When to use

  • You need L0 domain/integration event contracts (IDomainEvent, EventEnvelope<TEvent>) and in-process ValueTask dispatching.
  • You want RFC 9562 monotonic EventId values and CNCF CloudEvents v1.0 JSON serialization.

When NOT to use

  • You need durable broker delivery across process restarts—pair with EricksonLopez.Outbox or EricksonLopez.Messaging.

6. Core Capabilities & Design Invariants#

ValueTask In-Process Dispatch

Supports SequentialExecutionStrategy and ParallelExecutionStrategy with FailFast or AggregateAndContinue error policies.

Structured EventEnvelope & CloudEvents

Carries correlation, causation, tenant identity, and bidirectional CloudEvents v1.0 conversion.

OpenTelemetry & Source-Generated Metadata

Provides EventBusDiagnostics instrumentation and trimming-safe handler discovery.

7. Included NuGet Packages & Adapters#

Package IDStatusNuGet / LocalTFMsAOT StatusDownloadsDescription
EricksonLopez.EventsPrimaryPublishedv2.0.0 / v2.0.0net8.0, net9.0, net10.0AOT: Full398Event dispatching, bus orchestration and ambient pipeline primitives for decoupled, event-driven .NET applications, designed for trimming and Native AOT.
EricksonLopez.Events.ContractsPublishedv2.0.0 / v2.0.0net8.0, net9.0, net10.0AOT: Full4,095Pure domain-level event contracts and identifiers for decoupled, event-driven .NET applications. Zero third-party dependencies.
EricksonLopez.Events.TestingPublishedv2.0.0 / v2.0.0net8.0, net9.0, net10.0AOT: Full428Testing utilities and fake event publishers/handlers for EricksonLopez.Events.
EricksonLopez.Events.Serialization.SystemTextJsonPublishedv2.0.0 / v2.0.0net8.0, net9.0, net10.0AOT: Full298System.Text.Json Native AOT converters and serialization adapters for EricksonLopez.Events.
EricksonLopez.Events.CloudEventsPublishedv2.0.0 / v2.0.0net8.0, net9.0, net10.0AOT: Full291CloudEvents 1.0 adapter and bidirectional mapping extensions for EricksonLopez.Events, supporting CNCF standard event gateways and Native AOT.
EricksonLopez.Events.OpenTelemetryPublishedv2.0.0 / v2.0.0net8.0, net9.0, net10.0AOT: Full273OpenTelemetry instrumentation extensions for EricksonLopez.Events. Enables distributed tracing and metrics integration with OpenTelemetry .NET SDK.
EricksonLopez.Events.GeneratorsAnalyzer / GeneratorPublishedv2.0.0 / v2.0.0netstandard2.0AOT: N/A (Analyzer/Legacy)268Roslyn Incremental Source Generator for EricksonLopez.Events to generate zero-reflection compile-time event registries and descriptors.

8. Quick Start Code Example#

Grounded in verified public APIs from EricksonLopez.Events. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.

using System;
using EricksonLopez.Events.Contracts;
using EricksonLopez.Events.Identifiers;

public sealed record OrderPlacedDomainEvent(
    EventId Id,
    Guid OrderId,
    Guid CustomerId,
    decimal TotalAmount,
    string Currency,
    DateTimeOffset OccurredAt) : IDomainEvent;

9. Architecture & Dependency Flow#

flowchart LR
  lib_events["EricksonLopez.Events (L0)"]
  lib_shared_kernel["EricksonLopez.SharedKernel (L1)"]
  lib_shared_kernel --> lib_events
  lib_messaging["EricksonLopez.Messaging (L3)"]
  lib_messaging --> lib_events
  lib_outbox["EricksonLopez.Outbox (L3)"]
  lib_outbox --> lib_events
  lib_processes["EricksonLopez.Processes (L4)"]
  lib_processes --> lib_events
EricksonLopez.Events Dependency Topology0 upstream library dependencies and 4 downstream dependent libraries verified in dependencies.json.
View accessible text summary and structure

0 upstream library dependencies and 4 downstream dependent libraries verified in dependencies.json.

DirectionLibraryTierRelationship Kinds
DownstreamEricksonLopez.SharedKernelL1Compile-Time, NuGet Package
DownstreamEricksonLopez.MessagingL3Compile-Time, NuGet Package
DownstreamEricksonLopez.OutboxL3Compile-Time, NuGet Package
DownstreamEricksonLopez.ProcessesL4Compile-Time, NuGet Package
flowchart LR
  lib_events["EricksonLopez.Events (L0)"]
  lib_shared_kernel["EricksonLopez.SharedKernel (L1)"]
  lib_shared_kernel --> lib_events
  lib_messaging["EricksonLopez.Messaging (L3)"]
  lib_messaging --> lib_events
  lib_outbox["EricksonLopez.Outbox (L3)"]
  lib_outbox --> lib_events
  lib_processes["EricksonLopez.Processes (L4)"]
  lib_processes --> lib_events

10. Target Frameworks & Native AOT / Trimming Matrix#

MSBuild `.csproj` inspection across 7 packages: 6 Full, 0 Partial, 0 Incompatible, 1 NotApplicable (analyzers/generators).

Package IDIsAotCompatibleEnableTrimAnalyzerVerified AOT StatusTarget Frameworks
EricksonLopez.EventstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Events.ContractstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Events.TestingtruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Events.Serialization.SystemTextJsontruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Events.CloudEventstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Events.OpenTelemetrytruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Events.GeneratorsnullnullNotApplicablenetstandard2.0

11. Upstream Dependencies & Downstream Dependents#

Upstream Dependencies (0)

Zero cross-family upstream library dependencies (foundational node).

Downstream Dependents (4)

12. Optional Adapters & Third-Party Integrations#

Internal Adapter Edges & Integration Packages

No optional cross-family adapter edges or integration packages are recorded for this library.

Verified External NuGet Dependencies (3)

Microsoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.Logging.AbstractionsOpenTelemetry

13. Configuration & DI Registration Summary#

Verified DI & Configuration Entry Points

  • EventBusServiceCollectionExtensions.AddEnvelopeEventHandler<TEvent, THandler>

    Registers a strongly typed envelope event handler into the service collection and handler registry.

  • EventBusServiceCollectionExtensions.AddEventBus

    Registers core event bus services into the specified service collection.

  • EventBusServiceCollectionExtensions.AddEventHandler<TEvent, THandler>

    Registers a strongly typed event handler into the service collection and handler registry.

  • EventBusServiceCollectionExtensions.AddEventMiddleware<TMiddleware>

    Registers an event middleware into the pipeline with the specified lifetime.

  • CloudEventsJsonSerializerOptionsExtensions.ConfigureForCloudEvents

    Configures `JsonSerializerOptions` with CloudEvents v1.0 standard settings.

  • EventsOpenTelemetryExtensions.AddEventsInstrumentation

    Adds event metrics instrumentation to the meter provider.

  • EventsJsonSerializerOptionsExtensions.AddEventsConverters

    Adds Native AOT compatible event serialization converters to the options instance.

Key Public Types & Contracts

  • EricksonLopez.Events.Attributes.EventNameAttribute (class)

    Specifies the explicit, transport-stable semantic name for an event type.

  • EricksonLopez.Events.Attributes.EventSourceAttribute (class)

    Specifies the originating producer source or URI for an event or all events in an assembly.

  • EricksonLopez.Events.Attributes.EventVersionAttribute (class)

    Specifies the explicit schema version of an event contract.

  • EricksonLopez.Events.Bus.EventBus (class)

    Provides an in-process event bus for dispatching events to registered handlers through a configurable middleware pipeline.

  • EricksonLopez.Events.Bus.Configuration.ErrorHandlingPolicy (enum)

    Specifies how exceptions arising from individual event handlers are managed during dispatch.

  • EricksonLopez.Events.Bus.Configuration.EventBusOptions (class)

    Provides configuration options for the in-process event bus.

  • EricksonLopez.Events.Bus.Configuration.EventExecutionMode (enum)

    Specifies how multiple handlers registered for the same event type are executed during dispatch.

  • EricksonLopez.Events.Bus.Configuration.HandlerScopePolicy (enum)

    Specifies the service provider scoping policy when resolving event handlers.

  • EricksonLopez.Events.Bus.Diagnostics.EventBusDiagnostics (class)

    Provides OpenTelemetry ActivitySource and Metrics instruments for the EventBus.

  • EricksonLopez.Events.Bus.Exceptions.EventDispatchException (class)

    Represents errors that occur when one or more event handlers fail during event dispatch.

  • EricksonLopez.Events.Bus.Execution.IExecutionStrategy (interface)

    Defines a strategy for executing event handlers during dispatch.

  • EricksonLopez.Events.Bus.Execution.ParallelExecutionStrategy (class)

    Executes all registered handlers for an event concurrently, collecting and aggregating any handler exceptions into a single `EventDispatchException`, or failing fast if configured.

14. Verified Performance Benchmarks#

All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).

Total rows: 13 · Measured: 13 · NA / Error: 0 · Suites: 4

Observed runtimes: .NET 10.0.1 X64 RyuJIT x86-64-v3

Observed CPUs: 12th Gen Intel Core i7-12700K 3.60GHz, 1 CPU, 20 logical and 12 physical cores

SuiteMethodRuntimeMean (ns)Allocated (B)Status
RegistryBenchmarksRegistry_TryGetDescriptor_ByType_N1.NET 10.0.1 X64 RyuJIT x86-64-v31.8080measured
RegistryBenchmarksRegistry_TryGetDescriptor_ByType_N10.NET 10.0.1 X64 RyuJIT x86-64-v31.8550measured
RegistryBenchmarksRegistry_TryGetDescriptor_ByType_N100.NET 10.0.1 X64 RyuJIT x86-64-v32.0880measured
RegistryBenchmarksStaticRegistry_GetDescriptor_Cached.NET 10.0.1 X64 RyuJIT x86-64-v36.2510measured
RegistryBenchmarksRegistry_TryGetDescriptor_ByEventType_N100.NET 10.0.1 X64 RyuJIT x86-64-v314.9390measured
EventBenchmarksEnvelope_Create.NET 10.0.1 X64 RyuJIT x86-64-v326.0280measured
DispatchScenariosBenchmarksPublish_1Handler.NET 10.0.1 X64 RyuJIT x86-64-v3205.7624measured
EventBusBenchmarksEventBus_Sequential_1Handler.NET 10.0.1 X64 RyuJIT x86-64-v3275.4840measured
DispatchScenariosBenchmarksPublish_5Handlers.NET 10.0.1 X64 RyuJIT x86-64-v3358.5624measured
DispatchScenariosBenchmarksPublish_10Handlers.NET 10.0.1 X64 RyuJIT x86-64-v3589.8624measured
DispatchScenariosBenchmarksPublish_50Handlers.NET 10.0.1 X64 RyuJIT x86-64-v32,353.4624measured
DispatchScenariosBenchmarksPublish_100Events_Sequential.NET 10.0.1 X64 RyuJIT x86-64-v334,160.362,401measured
DispatchScenariosBenchmarksPublish_1000Events_Sequential.NET 10.0.1 X64 RyuJIT x86-64-v3358,108624,013measured

15. Release History & NuGet vs Repo Status#

NuGet and repository versions are aligned.

VersionSourcePublished DateSummary
v2.0.0 ↗github2026-09-20[2.0.0](https://github.com/ericksonlopezf/dotnet-events/compare/v1.0.0...v2.0.0) (2026-09-20) ⚠ BREAKING CHANGES * introduce event envelopes, execution context and versioned event infrastructure ✨ Features * introduce event envelopes, execution context and versioned event infrastructure ([30b20bc](https://github.com/ericksonlopezf/dotnet-events/commit/30b20bcfec2f7c13ef06b19555a9a8b455701f73))
v2.0.0 ↗nuget2026-09-20Published EricksonLopez.Events 2.0.0 to NuGet.org.
v1.0.0 ↗github2026-08-25Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Events` | `1.0.0` | | `EricksonLopez.Events.Contracts` | `1.0.0` | | `EricksonLopez.Events.CloudEvents` | `1.0.0` | | `EricksonLopez.Events.Generators` | `1.0.0` | | `EricksonLopez.Events.OpenTelemetry` | `1.0.0` | | `EricksonLopez.Events.Serialization.SystemTextJson` | `1.0.0` | | `EricksonLopez.Eve...
v1.0.0 ↗nuget2026-08-25Published EricksonLopez.Events 1.0.0 to NuGet.org.

Libraries in the same tier, architectural layer, or directly paired via dependency edges.

17. Documentation, API Reference & Portal Links#

Per-library conceptual Starlight pages expand in M4; API Reference pages expand in M3.2.

18. Source Repository, License & Contributing#

Released under the MIT License. All assemblies follow EricksonLopez.* build invariants: explicit imports, strong-name signing (`EricksonLopez.snk`), and ASCII author metadata (`Erickson Lopez`).

19. Troubleshooting, Pitfalls & Migration Guidance#

  • Register EventBus via AddEventBus() and explicit AddEventHandler<TEvent, THandler>() calls for deterministic Native AOT behavior.

20. Quality & Verification Evidence#

Strong-Name Signing (`EricksonLopez.snk`)
EricksonLopez.snk
`ImplicitUsings=disable`
disable
XML Documentation Extraction
Verified (26 namespaces, 77 types, 381 members)
MSBuild AOT / Trim Attributes
6 Full / 0 Partial / 0 Incompatible / 1 N/A
BenchmarkDotNet Artifacts
13 total (13 measured, 0 na_error)

Explicit Verification Boundaries & Limitations

  • All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.