From 6996dfb16f2f0c142e06c0a83dbfdab255956646 Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Fri, 31 Jan 2020 00:26:01 +0000 Subject: [PATCH] Target FsCodec 2.0.0-rc3 --- CHANGELOG.md | 2 +- DOCUMENTATION.md | 4 ++-- samples/Store/Domain/Domain.fsproj | 2 +- samples/Tutorial/AsAt.fsx | 1 + samples/Tutorial/Cosmos.fsx | 1 + samples/Tutorial/Counter.fsx | 1 + samples/Tutorial/Favorites.fsx | 9 +++++---- samples/Tutorial/Todo.fsx | 1 + src/Equinox.Cosmos/Equinox.Cosmos.fsproj | 2 +- src/Equinox.EventStore/Equinox.EventStore.fsproj | 2 +- src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj | 2 +- src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj | 2 +- .../Equinox.EventStore.Integration.fsproj | 2 +- 13 files changed, 18 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dda392f0d..38304b4a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ The `Unreleased` section name is replaced by the expected version of next releas ### Changed - `SqlStreamStore`.*: Target `SqlStreamStore` v `1.2.0-beta.8` -- Target `FsCodec` v `2.0.0-rc2` +- Target `FsCodec` v `2.0.0-rc3` - Target `Microsoft.SourceLink.GitHub`, `Microsoft.NETFramework.ReferenceAssemblies` v `1.0.0` - Samples etc target `Argu` v `6.0.0` - `eqx dump`'s `-J` switch now turns off JSON rendering diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index de30e1229..7fcc363a2 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -316,8 +316,8 @@ A final consideration to mention is that, even when correct idempotent handling type Service(log, resolve, ?maxAttempts) = let streamFor (clientId: string) = - let aggregateId = Equinox.AggregateId("Favorites", clientId) - let stream = resolve aggregateId + let streamName = FsCodec.StreamName.create "Favorites" clientId + let stream = resolve streamName Equinox.Stream(log, stream, defaultArg maxAttempts 3) let execute clientId command : Async = diff --git a/samples/Store/Domain/Domain.fsproj b/samples/Store/Domain/Domain.fsproj index d6364b12e..1cce48946 100644 --- a/samples/Store/Domain/Domain.fsproj +++ b/samples/Store/Domain/Domain.fsproj @@ -21,7 +21,7 @@ - + diff --git a/samples/Tutorial/AsAt.fsx b/samples/Tutorial/AsAt.fsx index 1977f123c..492a51334 100644 --- a/samples/Tutorial/AsAt.fsx +++ b/samples/Tutorial/AsAt.fsx @@ -20,6 +20,7 @@ #r "Serilog.dll" #r "Serilog.Sinks.Console.dll" #r "Newtonsoft.Json.dll" +#r "FSharp.UMX.dll" #r "FsCodec.dll" #r "Equinox.Core.dll" #r "Equinox.dll" diff --git a/samples/Tutorial/Cosmos.fsx b/samples/Tutorial/Cosmos.fsx index cbddb1864..792b08a69 100644 --- a/samples/Tutorial/Cosmos.fsx +++ b/samples/Tutorial/Cosmos.fsx @@ -10,6 +10,7 @@ #r "TypeShape.dll" #r "Equinox.dll" #r "Equinox.Core.dll" +#r "FSharp.UMX.dll" #r "FsCodec.dll" #r "FsCodec.NewtonsoftJson.dll" #r "FSharp.Control.AsyncSeq.dll" diff --git a/samples/Tutorial/Counter.fsx b/samples/Tutorial/Counter.fsx index 87bd577e6..6490871b0 100644 --- a/samples/Tutorial/Counter.fsx +++ b/samples/Tutorial/Counter.fsx @@ -7,6 +7,7 @@ #r "Equinox.dll" #r "Equinox.MemoryStore.dll" #r "TypeShape.dll" +#r "FSharp.UMX.dll" #r "FsCodec.dll" #r "FsCodec.NewtonsoftJson.dll" diff --git a/samples/Tutorial/Favorites.fsx b/samples/Tutorial/Favorites.fsx index 49b0270f5..790024b31 100644 --- a/samples/Tutorial/Favorites.fsx +++ b/samples/Tutorial/Favorites.fsx @@ -5,6 +5,7 @@ #r "Serilog.Sinks.Console.dll" #r "Equinox.dll" #r "Equinox.MemoryStore.dll" +#r "FSharp.UMX.dll" #r "FSCodec.dll" (* @@ -86,8 +87,8 @@ open Serilog let log = LoggerConfiguration().WriteTo.Console().CreateLogger() // related streams are termed a Category; Each client will have it's own Stream. -let categoryName = "Favorites" -let clientAFavoritesStreamId = Equinox.AggregateId(categoryName,"ClientA") +let categoryId = "Favorites" +let clientAFavoritesStreamId = FsCodec.StreamName.create categoryId "ClientA" // For test purposes, we use the in-memory store let store = Equinox.MemoryStore.VolatileStore() @@ -133,8 +134,8 @@ handler.Read |> Async.RunSynchronously type Service(log, resolve) = (* See Counter.fsx and Cosmos.fsx for a more compact representation which makes the Handler wiring less obtrusive *) let streamFor (clientId: string) = - let aggregateId = Equinox.AggregateId("Favorites", clientId) - let stream = resolve aggregateId + let streamName = FsCodec.StreamName.create "Favorites" clientId + let stream = resolve streamName Handler(log, stream) member __.Favorite(clientId, sku) = diff --git a/samples/Tutorial/Todo.fsx b/samples/Tutorial/Todo.fsx index cb3a3ec27..d75d0a42c 100644 --- a/samples/Tutorial/Todo.fsx +++ b/samples/Tutorial/Todo.fsx @@ -10,6 +10,7 @@ #r "TypeShape.dll" #r "Equinox.Core.dll" #r "Equinox.dll" +#r "FSharp.UMX.dll" #r "FsCodec.dll" #r "FsCodec.NewtonsoftJson.dll" #r "FSharp.Control.AsyncSeq.dll" diff --git a/src/Equinox.Cosmos/Equinox.Cosmos.fsproj b/src/Equinox.Cosmos/Equinox.Cosmos.fsproj index f3c2a1486..df7f0f958 100644 --- a/src/Equinox.Cosmos/Equinox.Cosmos.fsproj +++ b/src/Equinox.Cosmos/Equinox.Cosmos.fsproj @@ -25,7 +25,7 @@ - + diff --git a/src/Equinox.EventStore/Equinox.EventStore.fsproj b/src/Equinox.EventStore/Equinox.EventStore.fsproj index 109bd5464..37c8ace98 100644 --- a/src/Equinox.EventStore/Equinox.EventStore.fsproj +++ b/src/Equinox.EventStore/Equinox.EventStore.fsproj @@ -26,7 +26,7 @@ - + diff --git a/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj b/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj index 59a35c34e..849fc6467 100644 --- a/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj +++ b/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj @@ -24,7 +24,7 @@ - + \ No newline at end of file diff --git a/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj b/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj index b9b0d86c4..678ac9448 100644 --- a/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj +++ b/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj @@ -24,7 +24,7 @@ - + diff --git a/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj b/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj index fe5e8821f..43bc0a903 100644 --- a/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj +++ b/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj @@ -22,7 +22,7 @@ - +