-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fed4bb
commit 6387ca8
Showing
5 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/Swisschain.Extensions.Idempotency/DefaultOutboxRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace Swisschain.Extensions.Idempotency | ||
{ | ||
internal sealed class DefaultOutboxRepository : IOutboxRepository | ||
{ | ||
public Task<Outbox> Open(string requestId, Func<Task<long>> aggregateIdFactory) | ||
{ | ||
throw new InvalidOperationException("Outbox repository is not configured. To use outbox, you need to configure repository in service.AddOutbox(c => {...})"); | ||
} | ||
|
||
public Task Save(Outbox outbox, OutboxPersistingReason reason) | ||
{ | ||
throw new InvalidOperationException("Outbox repository is not configured. To use outbox, you need to configure repository in service.AddOutbox(c => {...})"); | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Swisschain.Extensions.Idempotency/OutboxConfigurationBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace Swisschain.Extensions.Idempotency | ||
{ | ||
public sealed class OutboxConfigurationBuilder | ||
{ | ||
internal OutboxConfigurationBuilder(IServiceCollection services) | ||
{ | ||
Services = services; | ||
} | ||
|
||
public IServiceCollection Services { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Swisschain.Extensions.Idempotency/OutboxPersistingReason.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters