File tree Expand file tree Collapse file tree
src/BuildingBlocks/CommandBus Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+
3+ <PropertyGroup >
4+ <TargetFramework >netstandard1.4</TargetFramework >
5+ </PropertyGroup >
6+
7+ </Project >
You can’t perform that action at this time.
0 commit comments