@ -0,0 +1,8 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<TargetFramework>netstandard1.4</TargetFramework> | |||||
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.CommandBus</RootNamespace> | |||||
</PropertyGroup> | |||||
</Project> |
@ -0,0 +1,13 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
using System.Threading.Tasks; | |||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.CommandBus | |||||
{ | |||||
public interface ICommandBus | |||||
{ | |||||
Task SendAsync<T>(T command) where T : IntegrationCommand; | |||||
} | |||||
} |
@ -0,0 +1,18 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace Microsoft.eShopOnContainers.BuildingBlocks.CommandBus | |||||
{ | |||||
public abstract class IntegrationCommand | |||||
{ | |||||
public Guid Id { get; private set; } | |||||
public DateTime Sent { get; private set; } | |||||
protected IntegrationCommand() | |||||
{ | |||||
Id = Guid.NewGuid(); | |||||
Sent = DateTime.UtcNow; | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<TargetFramework>netstandard1.4</TargetFramework> | |||||
</PropertyGroup> | |||||
</Project> |