Skip to content

Commit 6568647

Browse files
committed
CommandBus WIP
1 parent 2785dd7 commit 6568647

4 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard1.4</TargetFramework>
5+
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.CommandBus</RootNamespace>
6+
</PropertyGroup>
7+
8+
</Project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using System.Threading.Tasks;
5+
6+
namespace Microsoft.eShopOnContainers.BuildingBlocks.CommandBus
7+
{
8+
public interface ICommandBus
9+
{
10+
Task SendAsync<T>(T command) where T : IntegrationCommand;
11+
12+
}
13+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Microsoft.eShopOnContainers.BuildingBlocks.CommandBus
6+
{
7+
public abstract class IntegrationCommand
8+
{
9+
public Guid Id { get; private set; }
10+
public DateTime Sent { get; private set; }
11+
12+
protected IntegrationCommand()
13+
{
14+
Id = Guid.NewGuid();
15+
Sent = DateTime.UtcNow;
16+
}
17+
}
18+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard1.4</TargetFramework>
5+
</PropertyGroup>
6+
7+
</Project>

0 commit comments

Comments
 (0)