CommandBus WIP
This commit is contained in:
parent
2785dd7932
commit
656864768e
@ -0,0 +1,8 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard1.4</TargetFramework>
|
||||||
|
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.CommandBus</RootNamespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
13
src/BuildingBlocks/CommandBus/CommandBus/ICommandBus.cs
Normal file
13
src/BuildingBlocks/CommandBus/CommandBus/ICommandBus.cs
Normal file
@ -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>
|
Loading…
x
Reference in New Issue
Block a user