-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage.cs
46 lines (39 loc) · 965 Bytes
/
Message.cs
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
using JetBrains.Annotations;
namespace Teraa.Irc;
/// <summary>
/// Type representing an IRC message.
/// Message format is defined in <see href="https://datatracker.ietf.org/doc/html/rfc1459#section-2.3.1">RFC 1459 Section 2.3.1</see>.
/// </summary>
[PublicAPI]
public interface IMessage
{
/// <summary>
/// IRC command.
/// </summary>
Command Command { get; }
/// <summary>
/// Message tags.
/// </summary>
ITags? Tags { get; }
/// <summary>
/// Message prefix.
/// </summary>
IPrefix? Prefix { get; }
/// <summary>
/// Message argument.
/// </summary>
string? Arg { get; }
/// <summary>
/// Message content.
/// </summary>
IContent? Content { get; }
}
/// <inheritdoc />
[PublicAPI]
public record Message(
Command Command,
ITags? Tags = null,
IPrefix? Prefix = null,
string? Arg = null,
IContent? Content = null
) : IMessage;