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