-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrefix.cs
35 lines (30 loc) · 797 Bytes
/
Prefix.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
using JetBrains.Annotations;
namespace Teraa.Irc;
/// <summary>
/// Type representing message prefix of a <see cref="IMessage"/>.
/// Prefix contains information about the server or user sending the message.
/// See <see href="https://datatracker.ietf.org/doc/html/rfc1459#section-2.3.1">RFC 1459 Section 2.3.1</see> for details.
/// </summary>
[PublicAPI]
public interface IPrefix
{
/// <summary>
/// Server name or user nick.
/// </summary>
string Name { get; }
/// <summary>
/// User.
/// </summary>
string? User { get; }
/// <summary>
/// Host.
/// </summary>
string? Host { get; }
}
/// <inheritdoc />
[PublicAPI]
public record Prefix(
string Name,
string? User = null,
string? Host = null
) : IPrefix;