Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dariogriffo committed May 2, 2024
1 parent 19fcc9f commit 31ab024
Show file tree
Hide file tree
Showing 114 changed files with 528 additions and 463 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Run EventStore
run: docker compose up -d
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Create nuget packages
run: dotnet pack -c Release
- name: Push nuget packages
run: dotnet nuget push */**.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_API_KEY }}"
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Change Log

All notable changes to this project will be documented in this file.

## [1.0.3](https://github.com/dariogriffo/marty-net/blob/main/CHANGELOG.md)

Improve pipeline execution.

## [1.0.2](https://github.com/dariogriffo/marty-net/releases/tag/1.0.2)

Hide UncommittedEvents property from `Aggregate` class.

## [1.0.1](https://github.com/dariogriffo/marty-net/releases/tag/1.0.1)

Use DateTimeOffset instead of DateTime for the event timestamp.

Fixed lifetime for IAggregateStore

## [1.0.0](https://github.com/dariogriffo/marty-net/releases/tag/1.0.0)

First version with a stable API.

16 changes: 0 additions & 16 deletions RELEASE_NOTES.md

This file was deleted.

6 changes: 3 additions & 3 deletions examples/Common/Aggregates/Payment.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
namespace Common.Aggregates;

using System;
using System.Collections.Generic;
using System.Linq;
using Commands;
using Entities;
using Events;
using Marty.Net.Aggregates.Contracts;
using Marty.Net.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;

public class Payment : Aggregate
{
Expand Down
6 changes: 3 additions & 3 deletions examples/Common/Events/PaymentCaptured.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class PaymentCaptured : IEvent
{
Expand All @@ -12,5 +12,5 @@ public class PaymentCaptured : IEvent

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/PaymentDeclined.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class PaymentDeclined : IEvent
{
Expand All @@ -12,5 +12,5 @@ public class PaymentDeclined : IEvent

public DateTimeOffset Timestamp { get; init; } = DateTimeOffset.UtcNow;

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/PaymentRefunded.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class PaymentRefunded : IEvent
{
Expand All @@ -12,5 +12,5 @@ public class PaymentRefunded : IEvent

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/PaymentRequested.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class PaymentRequested : IEvent
{
Expand All @@ -14,5 +14,5 @@ public class PaymentRequested : IEvent

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/RefundActionAccepted.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class RefundActionAccepted : IEvent
{
public string TransactionId { get; init; } = null!;

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/RefundActionCompleted.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class RefundActionCompleted : IEvent
{
Expand All @@ -16,5 +16,5 @@ public class RefundActionCompleted : IEvent

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/RefundDeclined.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class RefundDeclined : IEvent
{
Expand All @@ -18,5 +18,5 @@ public class RefundDeclined : IEvent

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/RefundRequested.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class RefundRequested : IEvent
{
Expand All @@ -15,5 +15,5 @@ public class RefundRequested : IEvent

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
6 changes: 3 additions & 3 deletions examples/Common/Events/RefundRequestedRepeated.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Common.Events;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using System;
using System.Collections.Frozen;

public class RefundRequestedRepeated : IEvent
{
Expand All @@ -16,5 +16,5 @@ public class RefundRequestedRepeated : IEvent

public DateTimeOffset Timestamp { get; init; }

public IReadOnlyDictionary<string, string>? Metadata { get; set; }
public FrozenDictionary<string, string>? Metadata { get; set; }
}
4 changes: 2 additions & 2 deletions examples/Publisher/EventStoreConfigurationExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Publisher;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;

internal static class EventStoreConfigurationExtensions
{
Expand Down
6 changes: 3 additions & 3 deletions examples/Publisher/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using System.Text.Json;
using Common.Aggregates;
using Common.Aggregates;
using Common.Commands;
using Marty.Net;
using Marty.Net.Aggregates.Contracts;
using Marty.Net.Contracts;
using Microsoft.Extensions.DependencyInjection;
using Publisher;
using System;
using System.Text.Json;

ServiceCollection services = new();

Expand Down
4 changes: 2 additions & 2 deletions examples/Subscriber/EventStoreConfigurationExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Subscriber;

using System;
using System.Collections.Generic;
using Marty.Net.Contracts;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;

internal static class EventStoreConfigurationExtensions
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Subscriber/PaymentHandler.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace Subscriber;

using Common.Events;
using Marty.Net.Contracts;
using System;
using System.Threading;
using System.Threading.Tasks;
using Common.Events;
using Marty.Net.Contracts;

public class PaymentHandler : IEventHandler<PaymentRequested>, IEventHandler<PaymentCaptured>
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Subscriber/Pipelines/OpenBehavior.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace Subscriber.Pipelines;

using Marty.Net.Contracts;
using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Marty.Net.Contracts;

public class OpenBehavior<T> : IPipelineBehavior<T>
where T : IEvent
Expand Down
4 changes: 2 additions & 2 deletions examples/Subscriber/Pipelines/PaymentCapturedPostAction.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace Subscriber.Pipelines;

using Common.Events;
using Marty.Net.Contracts;
using System;
using System.Threading;
using System.Threading.Tasks;
using Common.Events;
using Marty.Net.Contracts;

public class PaymentCapturedPostAction : IPostProcessor<PaymentRequested>
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Subscriber/Pipelines/PaymentRequestedLogAction.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Subscriber.Pipelines;

using Common.Events;
using Marty.Net.Contracts;
using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Common.Events;
using Marty.Net.Contracts;

public class PaymentPreActions : IPreProcessor<PaymentRequested>
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Subscriber/Pipelines/PaymentRequestedPipeline1.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Subscriber.Pipelines;

using Common.Events;
using Marty.Net.Contracts;
using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Common.Events;
using Marty.Net.Contracts;

public class PaymentRequestedPipeline1 : IPipelineBehavior<PaymentRequested>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace Subscriber.Pipelines;

using Common.Events;
using Marty.Net.Contracts;
using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Common.Events;
using Marty.Net.Contracts;

public class PaymentRequestedPipelineBehavior : IPipelineBehavior<PaymentRequested>
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Subscriber/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using Common.Aggregates;
using Common.Aggregates;
using Marty.Net;
using Marty.Net.Aggregates.Contracts;
using Marty.Net.Contracts;
using Microsoft.Extensions.DependencyInjection;
using Subscriber;
using Subscriber.Pipelines;
using System;

ServiceCollection services = new();
services
Expand Down
3 changes: 2 additions & 1 deletion marty-net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution-items", "solution-
.github\workflows\ci.yml = .github\workflows\ci.yml
MediatR_LICENSE = MediatR_LICENSE
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
CHANGELOG.md = CHANGELOG.md
LICENSE = LICENSE
docker-compose.yml = docker-compose.yml
EndProjectSection
EndProject
Global
Expand Down
4 changes: 2 additions & 2 deletions src/Marty.Net.Aggregates.Contracts/Aggregate.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace Marty.Net.Aggregates.Contracts;

using Net.Contracts;
using ReflectionMagic;
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using Net.Contracts;
using ReflectionMagic;

/// <summary>
/// A base Aggregate NOT thread safe
Expand Down
Loading

0 comments on commit 31ab024

Please sign in to comment.