-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIMessageHandler.cs
More file actions
68 lines (63 loc) · 2.51 KB
/
IMessageHandler.cs
File metadata and controls
68 lines (63 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// =================================================================================================================================
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
// =================================================================================================================================
using RapidField.SolidInstruments.Command;
using RapidField.SolidInstruments.Core;
namespace RapidField.SolidInstruments.Messaging
{
/// <summary>
/// Processes messages.
/// </summary>
/// <remarks>
/// Do not use <see cref="IMessageHandler{TMessage}" /> as a registration target for inversion of control tools. Use
/// <see cref="ICommandHandler{TCommand}" /> instead.
/// </remarks>
/// <typeparam name="TMessage">
/// The type of the message that is processed by the handler.
/// </typeparam>
public interface IMessageHandler<in TMessage> : IMessageHandler<TMessage, Nix>, ICommandHandler<TMessage>
where TMessage : class, IMessage
{
}
/// <summary>
/// Processes messages.
/// </summary>
/// <remarks>
/// Do not use <see cref="IMessageHandler{TMessage, TResult}" /> as a registration target for inversion of control tools. Use
/// <see cref="ICommandHandler{TCommand}" /> instead.
/// </remarks>
/// <typeparam name="TMessage">
/// The type of the message that is processed by the handler.
/// </typeparam>
/// <typeparam name="TResult">
/// The type of the result that is emitted by the handler when processing a message.
/// </typeparam>
public interface IMessageHandler<in TMessage, TResult> : ICommandHandler<TMessage, TResult>, IMessageHandler
where TMessage : class, IMessage<TResult>
{
}
/// <summary>
/// Processes messages.
/// </summary>
/// <remarks>
/// Do not use <see cref="IMessageHandler" /> as a registration target for inversion of control tools. Use
/// <see cref="ICommandHandler{TCommand}" /> instead.
/// </remarks>
public interface IMessageHandler
{
/// <summary>
/// Gets the targeted entity type for the current <see cref="IMessageHandler" />.
/// </summary>
public MessagingEntityType EntityType
{
get;
}
/// <summary>
/// Gets the role of the current <see cref="IMessageHandler" />.
/// </summary>
public MessageHandlerRole Role
{
get;
}
}
}