Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Driver/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Driver;

internal class Program
{
#region Methods

internal static KurrentDBClientSettings ConfigureEventStoreSettings() {
KurrentDBClientSettings settings = new();
Expand Down Expand Up @@ -83,5 +82,4 @@ private static async Task SubscriptionsTest() {
concurrentSubscriptions.StartAsync(CancellationToken.None).Wait();
}

#endregion
}
2 changes: 0 additions & 2 deletions Shared.DomainDrivenDesign/EventSourcing/DomainEventRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public DomainEvent(Guid aggregateId,
this.EventType = DomainHelper.GetEventTypeName(this.GetType());
}

#region Properties

public Guid AggregateId { get; init; }

Expand All @@ -26,5 +25,4 @@ public DomainEvent(Guid aggregateId,

public String EventType { get; init; }

#endregion
}
2 changes: 0 additions & 2 deletions Shared.DomainDrivenDesign/EventSourcing/DomainHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/// </summary>
public static class DomainHelper
{
#region Methods

/// <summary>
/// Gets the name of the event type.
Expand All @@ -19,5 +18,4 @@ internal static String GetEventTypeName(Type type)
return type.Name;
}

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore.Tests/SubscriptionRepositoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace Shared.EventStore.Tests;

public class SubscriptionRepositoryTests
{
#region Methods

[Fact]
public async Task SubscriptionRepository_GetSubscriptions_ReturnsSubscriptions()
Expand Down Expand Up @@ -67,5 +66,4 @@ public async Task SubscriptionRepository_GetSubscriptions_FiltersInvalidSubscrip
second.PersistentSubscriptionInfo[0].GroupName.ShouldBe("Group-A");
}

#endregion
}
6 changes: 0 additions & 6 deletions Shared.EventStore.Tests/SubscriptionWorkerHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,17 @@ namespace Shared.EventStore.Tests;

public class SubscriptionWorkerHelperTests
{
#region Fields

private readonly IDomainEventHandlerResolverImposter domainEventHandlerResolver;

#endregion

#region Constructors

public SubscriptionWorkerHelperTests()
{
domainEventHandlerResolver = new();
}

#endregion

#region Methods

[Fact]
public void SubscriptionWorkerHelper_GetNewSubscriptions_SubscriptionsReturned()
Expand Down Expand Up @@ -188,5 +183,4 @@ public void SubscriptionWorkerHelper_TryCreatePersistentSubscriptionDetails_Vali
validationError.ShouldBeNull();
}

#endregion
}
4 changes: 0 additions & 4 deletions Shared.EventStore.Tests/TestObjects/EstateCreatedEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace Shared.EventStore.Tests.TestObjects;

public record EstateCreatedEvent : DomainEvent
{
#region Constructors

/// <summary>
/// Initializes a new instance of the <see cref="EstateCreatedEvent" /> class.
Expand All @@ -19,9 +18,7 @@ public EstateCreatedEvent(Guid aggregateId,
EstateName = estateName;
}

#endregion

#region Properties

/// <summary>
/// Gets the estate identifier.
Expand All @@ -39,5 +36,4 @@ public EstateCreatedEvent(Guid aggregateId,
/// </value>
public string EstateName { get; init; }

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore.Tests/TestObjects/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace Shared.EventStore.Tests.TestObjects;

public class TestData
{
#region Methods

public static readonly Guid AggregateId = Guid.Parse("103B335B-540A-4985-BB80-FD9B2BABF866");
public static readonly Guid EventId = Guid.Parse("C9416757-582C-4F67-A320-80FE1E937045");
Expand Down Expand Up @@ -120,5 +119,4 @@ public static List<PersistentSubscriptionInfo> GetPersistentSubscriptions_DemoEs
return list;
}

#endregion
}
6 changes: 0 additions & 6 deletions Shared.EventStore/Aggregate/Aggregate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/// </summary>
public abstract record Aggregate
{
#region Constructors

/// <summary>
/// Initializes a new instance of the <see cref="Aggregate" /> class.
Expand All @@ -20,9 +19,7 @@ protected Aggregate() {
this.Version = -1L;
}

#endregion

#region Properties

/// <summary>
/// Gets or sets the aggregate identifier.
Expand Down Expand Up @@ -64,9 +61,7 @@ protected Aggregate() {
/// </value>
internal IList<IDomainEvent> PendingEvents { get; set; }

#endregion

#region Methods

/// <summary>
/// Applies the and append.
Expand Down Expand Up @@ -101,5 +96,4 @@ public Object GetAggregateMetadata() {

protected abstract Object GetMetadata();

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore/Aggregate/AggregateExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

public static class AggregateExtensions
{
#region Methods

/// <summary>
/// Applies the specified historic event.
Expand Down Expand Up @@ -72,5 +71,4 @@ internal static Boolean IsEventDuplicate(this Aggregate aggregate,
return aggregate.EventHistory.ContainsKey(eventId) || aggregate.PendingEvents.Any(x => x.EventId == eventId);
}

#endregion
}
6 changes: 0 additions & 6 deletions Shared.EventStore/Aggregate/AggregateRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Shared.EventStore.Aggregate;
public sealed class AggregateRepository<TAggregate, TDomainEvent> : StandardTraceHandler, IAggregateRepository<TAggregate, TDomainEvent> where TAggregate : Aggregate, new()
where TDomainEvent : IDomainEvent
{
#region Fields

/// <summary>
/// The convert to event
Expand All @@ -28,19 +27,15 @@ namespace Shared.EventStore.Aggregate;

private readonly IDomainEventFactory<IDomainEvent> DomainEventFactory;

#endregion

#region Constructors

public AggregateRepository(IEventStoreContext eventStoreContext, IDomainEventFactory<IDomainEvent> domainEventFactory)
{
this.EventStoreContext = eventStoreContext;
DomainEventFactory = domainEventFactory;
}

#endregion

#region Methods

public async Task<Result<TAggregate>> GetLatestVersion(Guid aggregateId,
CancellationToken cancellationToken)
Expand Down Expand Up @@ -145,5 +140,4 @@ private Result<TAggregate> ProcessEvents(TAggregate aggregate,
return Result.Success(aggregate);
}

#endregion
}
6 changes: 0 additions & 6 deletions Shared.EventStore/Aggregate/AggregateRepositoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

public class AggregateRepositoryManager : IAggregateRepositoryManager
{
#region Fields

/// <summary>
/// The event store context manager
Expand All @@ -15,9 +14,7 @@ public class AggregateRepositoryManager : IAggregateRepositoryManager

private readonly IDomainEventFactory<IDomainEvent> DomainEventFactory;

#endregion

#region Constructors

/// <summary>
/// Initializes a new instance of the <see cref="AggregateRepositoryManager" /> class.
Expand All @@ -29,9 +26,7 @@ public AggregateRepositoryManager(IEventStoreContextManager eventStoreContextMan
DomainEventFactory = domainEventFactory;
}

#endregion

#region Methods

/// <summary>
/// Gets the aggregate repository.
Expand All @@ -47,5 +42,4 @@ public AggregateRepositoryManager(IEventStoreContextManager eventStoreContextMan
return new AggregateRepository<TAggregate, TDomainEvent>(context, DomainEventFactory);
}

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore/Aggregate/IAggregateRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace Shared.EventStore.Aggregate;
public interface IAggregateRepository<TAggregate, TDomainEvent> where TAggregate : Aggregate
where TDomainEvent : IDomainEvent
{
#region Methods

Task<Result<TAggregate>> GetLatestVersion(Guid aggregateId,
CancellationToken cancellationToken);
Expand All @@ -20,5 +19,4 @@ Task<Result> SaveChanges(TAggregate aggregate,

Task<Result<TAggregate>> GetLatestVersionFromLastEvent(Guid aggregateId, CancellationToken cancellationToken);

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore/Aggregate/IAggregateRepositoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

public interface IAggregateRepositoryManager
{
#region Methods

/// <summary>
/// Gets the aggregate repository.
Expand All @@ -17,5 +16,4 @@ public interface IAggregateRepositoryManager
where TDomainEvent : IDomainEvent;


#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore/Aggregate/IDomainEventFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ namespace Shared.EventStore.Aggregate;
/// <typeparam name="TDomainEvent">The type of the domain event.</typeparam>
public interface IDomainEventFactory<out TDomainEvent> where TDomainEvent : IDomainEvent
{
#region Methods

/// <summary>
/// Creates the agge aggregate snapshot.
Expand Down Expand Up @@ -42,5 +41,4 @@ TDomainEvent CreateDomainEvent(String json,
TDomainEvent[] CreateDomainEvents(Guid aggregateId,
IList<ResolvedEvent> @event);

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore/Aggregate/IEventDataFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace Shared.EventStore.Aggregate;
/// </summary>
public interface IEventDataFactory
{
#region Methods

/// <summary>
/// Creates the event data.
Expand All @@ -27,5 +26,4 @@ public interface IEventDataFactory
/// <returns></returns>
EventData[] CreateEventDataList(IList<IDomainEvent> domainEvents);

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore/Aggregate/ResolvedEventExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace Shared.EventStore.Aggregate;
/// </summary>
public static class ResolvedEventExtensions
{
#region Methods

/// <summary>
/// Gets the resolved event data as string.
Expand All @@ -24,5 +23,4 @@ public static String GetResolvedEventDataAsString(this ResolvedEvent resolvedEve
return Encoding.Default.GetString(resolvedEvent.Event.Data.ToArray(), 0, resolvedEvent.Event.Data.Length);
}

#endregion
}
4 changes: 0 additions & 4 deletions Shared.EventStore/Aggregate/TypeMapConvertor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace Shared.EventStore.Aggregate;
/// </summary>
public static class TypeMapConvertor
{
#region Fields

/// <summary>
/// The domain event record factory
Expand All @@ -23,9 +22,7 @@ public static class TypeMapConvertor

private static IDomainEventFactory<IDomainEvent> OverrideDomainEventFactory = null;

#endregion

#region Methods

public static IDomainEvent Convertor(IDomainEventFactory<IDomainEvent> overrideFactory, Guid aggregateId, ResolvedEvent @event)
{
Expand Down Expand Up @@ -97,5 +94,4 @@ private static IDomainEvent GetDomainEvent(Guid aggregateId,
return TypeMapConvertor.StandardDomainEventFactory.CreateDomainEvent(aggregateId, @event);
}

#endregion
}
2 changes: 0 additions & 2 deletions Shared.EventStore/Aggregate/TypeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
/// </summary>
public static class TypeProvider
{
#region Methods

public static void LoadDomainEventsTypeDynamically(Assembly[] assemblies)
{
Expand All @@ -37,5 +36,4 @@ public static void LoadDomainEventsTypeDynamically(Assembly[] assemblies)

public static void LoadDomainEventsTypeDynamically() => LoadDomainEventsTypeDynamically(null);

#endregion
}
6 changes: 0 additions & 6 deletions Shared.EventStore/EventHandling/DomainEventHandlerResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ namespace Shared.EventStore.EventHandling;

public class DomainEventHandlerResolver : IDomainEventHandlerResolver
{
#region Fields

/// <summary>
/// The domain event handlers
Expand All @@ -21,9 +20,7 @@ public class DomainEventHandlerResolver : IDomainEventHandlerResolver
/// </summary>
private readonly Dictionary<String, String[]> EventHandlerConfiguration;

#endregion

#region Constructors

/// <summary>
/// Initializes a new instance of the <see cref="DomainEventHandlerResolver" /> class.
Expand Down Expand Up @@ -51,9 +48,7 @@ public DomainEventHandlerResolver(Dictionary<String, String[]> eventHandlerConfi
}
}

#endregion

#region Methods

/// <summary>
/// Gets the domain event handlers.
Expand Down Expand Up @@ -90,5 +85,4 @@ public Result<List<IDomainEventHandler>> GetDomainEventHandlers(IDomainEvent dom
return Result.Success(handlersToReturn);
}

#endregion
}
Loading
Loading