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 : namespace Cqrs.Events
10 : {
11 : /// <summary>
12 : /// Receives instances of a <see cref="IEvent{TAuthenticationToken}"/> from the event bus.
13 : /// </summary>
14 : public interface IEventReceiver
15 : {
16 : /// <summary>
17 : /// Starts listening and processing instances of <see cref="IEvent{TAuthenticationToken}"/> from the event bus.
18 : /// </summary>
19 2 : void Start();
20 : }
21 :
22 : /// <summary>
23 : /// Receives instances of a <see cref="IEvent{TAuthenticationToken}"/> from the event bus.
24 : /// </summary>
25 : public interface IEventReceiver<TAuthenticationToken>
26 : : IEventReceiver
27 : {
28 : /// <summary>
29 : /// Receives a <see cref="IEvent{TAuthenticationToken}"/> from the event bus.
30 : /// </summary>
31 2 : bool? ReceiveEvent(IEvent<TAuthenticationToken> @event);
32 : }
33 : }
|