Skip to content

Commit

Permalink
Samples naming consistency
Browse files Browse the repository at this point in the history
Syncing from dotnet-templates
  • Loading branch information
bartelink committed Oct 7, 2022
1 parent 630042c commit ebca235
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions samples/Store/Domain/Cart.fs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ module Events =
| ItemQuantityChanged of ItemQuantityChangedInfo
| ItemPropertiesChanged of ItemPropertiesChangedInfo
interface TypeShape.UnionContract.IUnionContract
let codec = EventCodec.create<Event>()
let codecJe = EventCodec.createJson<Event>()
let codec = EventCodec.gen<Event>
let codecJe = EventCodec.genJsonElement<Event>

module Fold =

Expand Down
4 changes: 2 additions & 2 deletions samples/Store/Domain/ContactPreferences.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module Events =
type Event =
| [<System.Runtime.Serialization.DataMember(Name = "contactPreferencesChanged")>]Updated of Value
interface TypeShape.UnionContract.IUnionContract
let codec = EventCodec.create<Event>()
let codecJe = EventCodec.createJson<Event>()
let codec = EventCodec.gen<Event>
let codecJe = EventCodec.genJsonElement<Event>

module Fold =

Expand Down
4 changes: 2 additions & 2 deletions samples/Store/Domain/Favorites.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module Events =
| Favorited of Favorited
| Unfavorited of Unfavorited
interface TypeShape.UnionContract.IUnionContract
let codec = EventCodec.create<Event>()
let codecJe = EventCodec.createJson<Event>()
let codec = EventCodec.gen<Event>
let codecJe = EventCodec.genJsonElement<Event>

module Fold =

Expand Down
4 changes: 2 additions & 2 deletions samples/Store/Domain/Infrastructure.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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>()
2 changes: 1 addition & 1 deletion samples/Store/Domain/SavedForLater.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Event>()
let codec = EventCodec.gen<Event>

module Fold =
open Events
Expand Down
2 changes: 1 addition & 1 deletion samples/TodoBackend/Todo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Events =
| Cleared
| Snapshotted of Snapshotted
interface TypeShape.UnionContract.IUnionContract
let codec = EventCodec.create<Event> ()
let codec = EventCodec.gen<Event>

module Fold =
type State = { items : Events.Todo list; nextId : int }
Expand Down
4 changes: 2 additions & 2 deletions samples/Tutorial/Infrastructure.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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>()
4 changes: 2 additions & 2 deletions samples/Tutorial/Upload.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ module Events =
type Event =
| IdAssigned of IdAssigned
interface TypeShape.UnionContract.IUnionContract
let codec = EventCodec.create<Event> ()
let codecJe = EventCodec.createJson<Event> ()
let codec = EventCodec.gen<Event>
let codecJe = EventCodec.genJsonElement<Event>

module Fold =

Expand Down

0 comments on commit ebca235

Please sign in to comment.