Compze.Teventive 0.7.0-alpha

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

Compze.Teventive

The Teventive programming model for the Compze framework: taggregates, tevents and tevent dispatching.

License

Apache-2.0

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 (5)

Showing the top 5 NuGet packages that depend on Compze.Teventive:

Package Downloads
Compze.Teventive.TeventStore.Abstractions

Abstractions and ports for the Compze Teventive event store: the store API, its SQL-layer, tevent-publisher and serializer ports, query-model generator and migration contracts.

Compze.Teventive.MemoryImageStateStore

A memory image of taggregates: every taggregate held in memory for the container's life, rebuilt at its start from a snapshot of each, which JSON files, or a database's tables, keep. A taggregate store that keeps taggregates as their state, not their history.

Compze.Teventive.TeventStore

Event store implementation for Compze event sourcing.

Compze.Serialization.SystemTextJson

Compze's serializer on System.Text.Json, for Tessaging, Typermedia, the tevent store, the document db and taggregate snapshots.

Compze.Teventive.TeventStore.Typermedia

Typermedia API bridge for the Compze event store — exposes event store operations as Typermedia tueries and tommands.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.15.1-alpha 0 12/5/2026
0.15.0-alpha 25 12/5/2026
0.14.1-alpha 195 12/4/2026
0.14.0-alpha 180 12/4/2026
0.13.0-alpha 96 12/3/2026
0.12.0-alpha 276 12/2/2026
0.11.0-alpha 621 12/1/2026
0.10.0-alpha 166 11/29/2026
0.9.2-alpha 123 11/28/2026
0.9.1-alpha 191 11/28/2026
0.9.0-alpha 332 11/27/2026
0.8.0-alpha 115 11/26/2026
0.7.1-alpha 122 11/25/2026
0.7.0-alpha 167 11/19/2026
0.6.0-alpha 146 11/14/2026
0.5.1-alpha 89 11/13/2026
0.5.0-alpha 224 7/24/2026
0.4.0-alpha 169 7/15/2026
0.3.2-alpha 124 7/7/2026
0.3.1-alpha 116 7/6/2026
Loading failed

- **Changed without a signature changing, so no compiler error points at it:**
 - **A taggregate's tevents are no longer delivered to other processes unless their hierarchy says so.** `ITaggregateTevent` no longer extends `IExactlyOnceTevent`, so a hierarchy whose root interface declares no delivery guarantee of its own is published and handled within the process only. Nothing fails where it is published: another endpoint that handled or observed its tevents simply receives none. A hierarchy whose tevents other processes need declares its guarantee on its root interface, such as `IExactlyOnceTevent`. Below, under `ITaggregateTevent`.
 - **A taggregate store's updater needs a unit of work that `ExecuteUnitOfWork` began,** and **a publish that fails rolls its unit of work back, even when the code that published catches the exception.** Both are new for a tevent store's taggregates: see Compze.Teventive.TeventStore's changelog.
- **Every teventive class changes: it declares its tevent routing once, for the class,** a taggregate's, its components', its entities' and a shared tomponent's alike, in a `TeventRouting` kept in a static field, and returns it from its override of the protected abstract `TeventAppliers` (and, for a taggregate's tevent handlers, of the protected virtual `TeventHandlers`): `protected override TeventRouting TeventAppliers => Appliers;`. This replaces registering appliers and handlers in every instance's constructor (`RegisterTeventAppliers()`, `RegisterTeventHandlers()`), so an instance holds none of its routing. A class's routing starts with its Compze base class's `DeclareAppliers`, a subclass's extends its base class's with `Extend`, and a tevent reaches the routes it matches one after another, in the order declared, a base class's before a subclass's, as it reached registered appliers and handlers in the order registered. A class that inherits its base class's routing without declaring its own is refused when it is constructed. A taggregate's tevent handlers are declared with `DeclareHandlers`. The constructors no longer take a `TeventDispatcherConfig`. `Taggregate` is abstract. `TeventApplyingRoot<TRoot, TTevent>` and `TeventApplyingPart<TPart, TPartTevent>` are the base classes that apply tevents by a class's routing: the first of a taggregate and of a self-generating query model, the second of their components and entities.
- **Taggregate stores share one programming model:** `ITaggregateStoreReader` (`Get`, `TryGet`, `Reference`) reads the taggregates of whichever store keeps each class, and returns a unit of work's own instance inside it; `ITaggregateStoreUpdater` (`GetForUpdate`, `TryGetForUpdate`, and `Add` for a new taggregate) changes them, one for each unit of work, which must be one that `ExecuteUnitOfWork` began, and which rolls back when a publish has failed, even if the code that published caught the exception; `ITaggregateReference<TTaggregate>` is what code holds across units of work, and only reads: a unit of work gets the taggregate it stands for for update by its `Id`. Compze.Teventive.MemoryImageStateStore and Compze.Teventive.TeventStore both implement them, so one unit of work can change taggregates of both. Asking for a taggregate that no store holds throws an `ArgumentOutOfRangeException`, and asking for one as another class than its own, of the same store, throws. What a read or a get for update costs is each store's own, and its documentation says it.
- **A taggregate is deleted by publishing a tevent that implements `ITaggregateDeletedTevent`,** from a method of its own, as any other change is made; the stores have no delete operation. Inside the unit of work it is then no longer found, by `Get`, `TryGet`, `GetForUpdate` or `ReferencesToAll`, and when the unit of work commits it leaves its store. A taggregate publishes nothing after its deleted tevent: such a publish throws, naming the taggregate and the tevent, and the unit of work rolls back.
- **`ITaggregateStoreBulkReader`,** which extends `ITaggregateStoreReader` with `ReferencesToAll<TTaggregate>()`: a reference to every taggregate of a class, in no particular order, whichever store keeps the class, and inside a unit of work its own view. Reading every taggregate of a class is a scan of all a store holds for most stores, so it has a reader of its own, and code that reads everything says so in what it depends on.
- **`ISnapshotable<TSelf, TSnapshot>`:** a taggregate whose whole state is taken as a snapshot and restored from one, for a store that keeps taggregates as their state. `Taggregate`'s protected `RestoreIdentity` gives an instance being restored its id, and an entity collection's `AddWhileRestoring(id)` adds a restored entity without a tevent, only while the restore lasts.
- A taggregate instance that a store serves to readers is read only: publishing on it throws, saying so.
- **`SnapshotRoundTrip.DifferencesBetweenItAndItsCopy`,** for a consumer's specifications and tools: it makes a copy of a taggregate through a snapshot, as a state store makes each unit of work's copy, and names each difference between the copy and the taggregate, none when the copy holds the state the taggregate holds, in every field of the taggregate's own classes and of its parts. It catches a field the snapshot type has no place for, and one that `TakeSnapshot` or `RestoreFrom` leaves out. A value created on its first read, a `LazyCE` or a `Lazy<T>`, is compared by its value. A specification asserts that the list is empty, and a tool that checks many taggregates reports what it finds.
- **`ITaggregateTevent` is a plain `ITevent`:** it no longer extends `IExactlyOnceTevent`, so a taggregate's tevents are published and handled synchronously within the process, and carry no identity. A hierarchy that a tevent store keeps declares `ITaggregateTeventWithIdentity` on its root interface and derives its root class from `TaggregateTeventWithIdentity`; one whose tevents are delivered to other processes declares its guarantee, such as `IExactlyOnceTevent`. `TaggregateTevent` no longer has an `Id`.
- **`IMutableTaggregateTevent` and `IMutableTaggregateTeventWithIdentity` are internal:** their members, for Compze's internal use, set the values a taggregate gives a tevent when it publishes it, and a tevent store when it reads it back.
- `TaggregateIdentifyingTevent.WrapIn` has an overload for a tevent with identity, returning the wrapped form a tevent migration hands to the tevent store.
- **A `SharedTomponentSlot` belongs to the owner's class:** declared once, in a static field, and shared by every instance, it takes the adopting wrapper tevent implementation and a `Func<TOwner, SharedTomponent<TTomponentTevent>>` that gets the shared tomponent from an owner, and a shared tomponent is constructed with `slot.In(owner)`. The owner keeps no slot object.
- **A `SharedTomponentSlot` refuses an adopting wrapper tevent implementation that doesn't implement its adopting wrapper tevent:** constructing it with another slot's wrapper, such as the billing address's for the shipping address, throws an `ArgumentException` naming the implementation. Before, the slot's tevents were wrapped as the other slot's and applied to that slot's tomponent, with no error.
- **Requires newer minor versions of other Compze packages:** Compze.DependencyInjection 0.10.0-alpha (was 0.9.0-alpha), Compze.Internals.SystemCE 0.9.0-internal (was 0.8.0-internal). Upgrading to this version upgrades each package listed here too, so their changelogs apply to this upgrade as well.