-
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.
Merge pull request #33 from marcwittke/hotfix/3.2.5
Hotfix/3.2.5
- Loading branch information
Showing
19 changed files
with
202 additions
and
38 deletions.
There are no files selected for viewing
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
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
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,13 @@ | ||
namespace Backend.Fx.Logging | ||
{ | ||
using System; | ||
using System.Diagnostics; | ||
|
||
public class DebugExceptionLogger : IExceptionLogger | ||
{ | ||
public void LogException(Exception exception) | ||
{ | ||
Debug.WriteLine(exception); | ||
} | ||
} | ||
} |
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
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
37 changes: 37 additions & 0 deletions
37
src/Backend.Fx/Patterns/EventAggregation/Integration/EventBusScope.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,37 @@ | ||
namespace Backend.Fx.Patterns.EventAggregation.Integration | ||
{ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using BuildingBlocks; | ||
|
||
public interface IEventBusScope : IDomainService | ||
{ | ||
void Publish(IIntegrationEvent integrationEvent); | ||
Task RaiseEvents(); | ||
} | ||
|
||
public class EventBusScope : IEventBusScope | ||
{ | ||
private readonly List<IIntegrationEvent> integrationEvents = new List<IIntegrationEvent>(); | ||
private readonly IEventBus eventBus; | ||
|
||
public EventBusScope(IEventBus eventBus) | ||
{ | ||
this.eventBus = eventBus; | ||
} | ||
|
||
void IEventBusScope.Publish(IIntegrationEvent integrationEvent) | ||
{ | ||
integrationEvents.Add(integrationEvent); | ||
} | ||
|
||
public async Task RaiseEvents() | ||
{ | ||
foreach (var integrationEvent in integrationEvents) | ||
{ | ||
await eventBus.Publish(integrationEvent); | ||
} | ||
} | ||
} | ||
} | ||
|
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
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
Oops, something went wrong.