From ebca2357c12f5ef46bbbba6e417d153272798285 Mon Sep 17 00:00:00 2001 From: Ruben Bartelink Date: Fri, 7 Oct 2022 15:38:31 +0100 Subject: [PATCH] Samples naming consistency Syncing from dotnet-templates --- samples/Store/Domain/Cart.fs | 4 ++-- samples/Store/Domain/ContactPreferences.fs | 4 ++-- samples/Store/Domain/Favorites.fs | 4 ++-- samples/Store/Domain/Infrastructure.fs | 4 ++-- samples/Store/Domain/SavedForLater.fs | 2 +- samples/TodoBackend/Todo.fs | 2 +- samples/Tutorial/Infrastructure.fs | 4 ++-- samples/Tutorial/Upload.fs | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/samples/Store/Domain/Cart.fs b/samples/Store/Domain/Cart.fs index a53c26322..c3eec5710 100644 --- a/samples/Store/Domain/Cart.fs +++ b/samples/Store/Domain/Cart.fs @@ -24,8 +24,8 @@ module Events = | ItemQuantityChanged of ItemQuantityChangedInfo | ItemPropertiesChanged of ItemPropertiesChangedInfo interface TypeShape.UnionContract.IUnionContract - let codec = EventCodec.create() - let codecJe = EventCodec.createJson() + let codec = EventCodec.gen + let codecJe = EventCodec.genJsonElement module Fold = diff --git a/samples/Store/Domain/ContactPreferences.fs b/samples/Store/Domain/ContactPreferences.fs index a988c67ce..39242f5a7 100644 --- a/samples/Store/Domain/ContactPreferences.fs +++ b/samples/Store/Domain/ContactPreferences.fs @@ -12,8 +12,8 @@ module Events = type Event = | []Updated of Value interface TypeShape.UnionContract.IUnionContract - let codec = EventCodec.create() - let codecJe = EventCodec.createJson() + let codec = EventCodec.gen + let codecJe = EventCodec.genJsonElement module Fold = diff --git a/samples/Store/Domain/Favorites.fs b/samples/Store/Domain/Favorites.fs index b2f38bcb5..83803f2e5 100644 --- a/samples/Store/Domain/Favorites.fs +++ b/samples/Store/Domain/Favorites.fs @@ -14,8 +14,8 @@ module Events = | Favorited of Favorited | Unfavorited of Unfavorited interface TypeShape.UnionContract.IUnionContract - let codec = EventCodec.create() - let codecJe = EventCodec.createJson() + let codec = EventCodec.gen + let codecJe = EventCodec.genJsonElement module Fold = diff --git a/samples/Store/Domain/Infrastructure.fs b/samples/Store/Domain/Infrastructure.fs index af5f52947..16ee605e7 100644 --- a/samples/Store/Domain/Infrastructure.fs +++ b/samples/Store/Domain/Infrastructure.fs @@ -78,9 +78,9 @@ module InventoryItemId = let toString (value : InventoryItemId) : string = Guid. module EventCodec = /// For CosmosStore - we encode to JsonElement as that's what the store talks - let createJson<'t when 't :> TypeShape.UnionContract.IUnionContract> () = + let genJsonElement<'t when 't :> TypeShape.UnionContract.IUnionContract> = FsCodec.SystemTextJson.CodecJsonElement.Create<'t>() /// For stores other than CosmosStore, we encode to UTF-8 and have the store do the right thing - let create<'t when 't :> TypeShape.UnionContract.IUnionContract> () = + let gen<'t when 't :> TypeShape.UnionContract.IUnionContract> = FsCodec.NewtonsoftJson.Codec.Create<'t>() diff --git a/samples/Store/Domain/SavedForLater.fs b/samples/Store/Domain/SavedForLater.fs index f8cc3becf..51ae79880 100644 --- a/samples/Store/Domain/SavedForLater.fs +++ b/samples/Store/Domain/SavedForLater.fs @@ -29,7 +29,7 @@ module Events = /// Addition of a collection of skus to the list | Added of Added interface TypeShape.UnionContract.IUnionContract - let codec = EventCodec.create() + let codec = EventCodec.gen module Fold = open Events diff --git a/samples/TodoBackend/Todo.fs b/samples/TodoBackend/Todo.fs index 42c745039..7bcf8ed3d 100644 --- a/samples/TodoBackend/Todo.fs +++ b/samples/TodoBackend/Todo.fs @@ -20,7 +20,7 @@ module Events = | Cleared | Snapshotted of Snapshotted interface TypeShape.UnionContract.IUnionContract - let codec = EventCodec.create () + let codec = EventCodec.gen module Fold = type State = { items : Events.Todo list; nextId : int } diff --git a/samples/Tutorial/Infrastructure.fs b/samples/Tutorial/Infrastructure.fs index d91024f63..e12258878 100644 --- a/samples/Tutorial/Infrastructure.fs +++ b/samples/Tutorial/Infrastructure.fs @@ -22,9 +22,9 @@ module IndexId = module EventCodec = /// For CosmosStore - we encode to JsonElement as that's what the store talks - let createJson<'t when 't :> TypeShape.UnionContract.IUnionContract> () = + let genJsonElement<'t when 't :> TypeShape.UnionContract.IUnionContract> = FsCodec.SystemTextJson.CodecJsonElement.Create<'t>() /// For stores other than CosmosStore, we encode to UTF-8 and have the store do the right thing - let create<'t when 't :> TypeShape.UnionContract.IUnionContract> () = + let gen<'t when 't :> TypeShape.UnionContract.IUnionContract> = FsCodec.NewtonsoftJson.Codec.Create<'t>() diff --git a/samples/Tutorial/Upload.fs b/samples/Tutorial/Upload.fs index 92daf580f..54e8eb8f3 100644 --- a/samples/Tutorial/Upload.fs +++ b/samples/Tutorial/Upload.fs @@ -29,8 +29,8 @@ module Events = type Event = | IdAssigned of IdAssigned interface TypeShape.UnionContract.IUnionContract - let codec = EventCodec.create () - let codecJe = EventCodec.createJson () + let codec = EventCodec.gen + let codecJe = EventCodec.genJsonElement module Fold =