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;
10 :
11 : namespace Cqrs.Messages
12 : {
13 : /// <summary>
14 : /// Responds to or "Handles" a <see cref="IMessage"/>.
15 : /// </summary>
16 : /// <typeparam name="TMessage">The <see cref="Type"/> of <see cref="IMessage"/>.</typeparam>
17 : public interface IMessageHandler<in TMessage>
18 : : IHandler
19 : where TMessage: IMessage
20 : {
21 : /// <summary>
22 : /// Responds to the provided <paramref name="message"/>.
23 : /// </summary>
24 : /// <param name="message">The <typeparamref name="TMessage"/> to respond to or "handle"</param>
25 1 : void Handle(TMessage message);
26 : }
27 : }
|