Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="cdmdotnet Limited">
4 : // // Copyright cdmdotnet Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System.Collections.Generic;
10 :
11 : namespace Cqrs.Commands
12 : {
13 : /// <summary>
14 : /// Publishes an <see cref="ICommand{TAuthenticationToken}"/>
15 : /// </summary>
16 : public interface ICommandPublisher<TAuthenticationToken>
17 : {
18 : /// <summary>
19 : /// Publishes the provided <paramref name="command"/> on the command bus.
20 : /// </summary>
21 1 : void Publish<TCommand>(TCommand command)
22 : where TCommand : ICommand<TAuthenticationToken>;
23 :
24 : /// <summary>
25 : /// Publishes the provided <paramref name="commands"/> on the command bus.
26 : /// </summary>
27 1 : void Publish<TCommand>(IEnumerable<TCommand> commands)
28 : where TCommand : ICommand<TAuthenticationToken>;
29 : }
30 : }
|