From 647a25b9b1d53cb43e49c4d45ddbb24575d1daf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Sat, 11 Nov 2023 20:28:55 +0100 Subject: [PATCH 1/4] Updated Node-version to 18.x --- .github/workflows/docs-prs.yml | 2 +- .github/workflows/docs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-prs.yml b/.github/workflows/docs-prs.yml index 0db40e4266..5620d644f5 100644 --- a/.github/workflows/docs-prs.yml +++ b/.github/workflows/docs-prs.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-node@v3 name: Setup node with: - node-version: "16" + node-version: "18" - run: npm install -g cspell name: Install cSpell - run: cspell --config ./docs/cSpell.json "docs/**/*.md" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 32bcba5249..ed4dc8f00b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,7 +14,7 @@ env: config: Release DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - node_version: 16.x + node_version: 18.x jobs: build-and-test-code: From 28b41112f722f38423499e25602b3e02c122c0b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Sun, 12 Nov 2023 00:13:00 +0100 Subject: [PATCH 2/4] Replaced (internal) Event with IEvent in docs --- docs/events/metadata.md | 2 +- docs/events/projections/aggregate-projections.md | 6 +++--- docs/events/projections/event-projections.md | 4 ++-- docs/events/projections/index.md | 4 ++-- docs/events/querying.md | 2 +- src/Marten/Events/Projections/Examples.cs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/events/metadata.md b/docs/events/metadata.md index 6090470181..cdcaca8cb6 100644 --- a/docs/events/metadata.md +++ b/docs/events/metadata.md @@ -24,7 +24,7 @@ var store = DocumentStore.For(opts => snippet source | anchor -The actual metadata is accessible from the `IEvent` interface or `Event` event wrappers as shown below: +The actual metadata is accessible from the `IEvent` interface event wrappers as shown below (which are implemented by internal `Event`): diff --git a/docs/events/projections/aggregate-projections.md b/docs/events/projections/aggregate-projections.md index 109cfb8d48..5dd5b72066 100644 --- a/docs/events/projections/aggregate-projections.md +++ b/docs/events/projections/aggregate-projections.md @@ -224,7 +224,7 @@ public class TripProjection: SingleStreamProjection snippet source | anchor -The `Create()` method has to return either the aggregate document type or `Task` where `T` is the aggregate document type. There must be an argument for the specific event type or `Event` where `T` is the event type if you need access to event metadata. You can also take in an `IQuerySession` if you need to look up additional data as part of the transformation or `IEvent` in addition to the exact event type just to get at event metadata. +The `Create()` method has to return either the aggregate document type or `Task` where `T` is the aggregate document type. There must be an argument for the specific event type or `IEvent` where `T` is the event type if you need access to event metadata. You can also take in an `IQuerySession` if you need to look up additional data as part of the transformation or `IEvent` in addition to the exact event type just to get at event metadata. ## Applying Changes to the Aggregate Document @@ -303,7 +303,7 @@ public class TripProjection: SingleStreamProjection The `Apply()` methods can accept any combination of these arguments: 1. The actual event type -1. `Event` where the `T` is the actual event type. Use this if you want access to the [event metadata](/events/metadata) like versions or timestamps. +1. `IEvent` where the `T` is the actual event type. Use this if you want access to the [event metadata](/events/metadata) like versions or timestamps. 1. `IEvent` access the event metadata. It's perfectly valid to accept both `IEvent` for the metadata and the specific event type just out of convenience. 1. `IQuerySession` if you need to do additional data lookups 1. The aggregate type @@ -405,7 +405,7 @@ public class TripProjection: SingleStreamProjection The `ShouldDelete()` method can take any combination of these arguments: 1. The actual event type -1. `Event` where the `T` is the actual event type. Use this if you want access to the [event metadata](/events/metadata) like versions or timestamps. +1. `IEvent` where the `T` is the actual event type. Use this if you want access to the [event metadata](/events/metadata) like versions or timestamps. 1. `IQuerySession` if you need to do additional data lookups 1. The aggregate type diff --git a/docs/events/projections/event-projections.md b/docs/events/projections/event-projections.md index 4cfc2d4881..c38f00712a 100644 --- a/docs/events/projections/event-projections.md +++ b/docs/events/projections/event-projections.md @@ -93,7 +93,7 @@ that way. Your other option is to use either the `Create()` or `Project()` metho The `Create()` method can accept these arguments: -* The actual event type or `Event` where `T` is the event type. One of these is required +* The actual event type or `IEvent` where `T` is the event type. One of these is required * `IEvent` to get access to the event metadata * Optionally take in `IDocumentOperations` if you need to access other data. This interface supports all the functionality of `IQuerySession` @@ -106,7 +106,7 @@ The `Create()` method needs to return either: The `Project()` methods can accept these arguments: -* The actual event type or `Event` where `T` is the event type. One of these is required. +* The actual event type or `IEvent` where `T` is the event type. One of these is required. * `IEvent` to get access to the event metadata * `IDocumentOperations` is mandatory, and this is what you'd use to register any document operations diff --git a/docs/events/projections/index.md b/docs/events/projections/index.md index 2c32b19029..0c983c592d 100644 --- a/docs/events/projections/index.md +++ b/docs/events/projections/index.md @@ -64,9 +64,9 @@ public class QuestParty snippet source | anchor -New in Marten 1.2 is the ability to use `Event` metadata within your projections, assuming that you're not trying to run the aggregations inline. +Marten provides the ability to use `IEvent` metadata within your projections, assuming that you're not trying to run the aggregations inline. -The syntax using the built in aggregation technique is to take in `Event` as the argument to your `Apply(event)` methods, +The syntax using the built in aggregation technique is to take in `IEvent` as the argument to your `Apply(event)` methods, where `T` is the event type you're interested in: diff --git a/docs/events/querying.md b/docs/events/querying.md index c50b866e7f..bf51fc74bd 100644 --- a/docs/events/querying.md +++ b/docs/events/querying.md @@ -36,7 +36,7 @@ public async Task load_event_stream_async(IDocumentSession session, Guid streamI snippet source | anchor -The data returned is a list of `IEvent` objects, where each is a strongly-typed `Event` object shown below: +The data returned is a list of `IEvent` objects, where each is a (internal) strongly-typed `Event` object shown below: diff --git a/src/Marten/Events/Projections/Examples.cs b/src/Marten/Events/Projections/Examples.cs index 66032463fb..0d94a6a333 100644 --- a/src/Marten/Events/Projections/Examples.cs +++ b/src/Marten/Events/Projections/Examples.cs @@ -51,7 +51,7 @@ public DocumentAttribute(Type documentType) public Type DocumentType { get; } } -// All the signatures could take in IQuerySession, or Event +// All the signatures could take in IQuerySession, or IEvent public class SomeDocument1Projector { public SomeDocument1 Create(SomeEvent1 event1) From 3125505941676606fb0ca5b212a27965fd9c6dd9 Mon Sep 17 00:00:00 2001 From: Babu Annamalai Date: Tue, 21 Nov 2023 08:05:17 +0530 Subject: [PATCH 3/4] Tweak a text pertaining to usage of IEvent --- docs/events/projections/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/events/projections/index.md b/docs/events/projections/index.md index 0c983c592d..f70263cda4 100644 --- a/docs/events/projections/index.md +++ b/docs/events/projections/index.md @@ -67,7 +67,7 @@ public class QuestParty Marten provides the ability to use `IEvent` metadata within your projections, assuming that you're not trying to run the aggregations inline. The syntax using the built in aggregation technique is to take in `IEvent` as the argument to your `Apply(event)` methods, -where `T` is the event type you're interested in: +where `T` is the event type you're interested in [Single Stream Projections](/events/projections/aggregate-projections). From 25f5fc273171719c3d6d8aabfc548d16d16ba6d9 Mon Sep 17 00:00:00 2001 From: Babu Annamalai Date: Tue, 21 Nov 2023 08:07:30 +0530 Subject: [PATCH 4/4] Another tweak to the the verbiage of using IEvent in docs. --- docs/events/projections/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/events/projections/index.md b/docs/events/projections/index.md index f70263cda4..c257984320 100644 --- a/docs/events/projections/index.md +++ b/docs/events/projections/index.md @@ -67,7 +67,7 @@ public class QuestParty Marten provides the ability to use `IEvent` metadata within your projections, assuming that you're not trying to run the aggregations inline. The syntax using the built in aggregation technique is to take in `IEvent` as the argument to your `Apply(event)` methods, -where `T` is the event type you're interested in [Single Stream Projections](/events/projections/aggregate-projections). +where `T` is the event type you're interested is covered in [Single Stream Projections](/events/projections/aggregate-projections).