~ruther/NosSmooth

ref: 6f8822252833b20c112019b294c7f8b3e3cd4b7a NosSmooth/Core/NosSmooth.Packets/PacketToken.cs -rw-r--r-- 1.1 KiB
6f882225 — František Boháček feat: add support for conditional packet attribute 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//
//  PacketToken.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Diagnostics.CodeAnalysis;

namespace NosSmooth.Packets;

/// <summary>
/// The single token from a packet.
/// </summary>
/// <param name="Token">The token.</param>
/// <param name="IsLast">Whether the token is last in the current level. Null if it cannot be determined.</param>
/// <param name="EncounteredUpperLevel">Whether the current separator was from an upper stack level than the parent. That could mean some kind of an error if not etc. at the end of parsing a last entry of a list and last entry of a subpacket.</param>
/// <param name="PacketEndReached">Whether the packet's end was reached.</param>
[SuppressMessage("StyleCop.CSharp.NamingRules", "SA1313:Parameter names should begin with lower-case letter", Justification = "Record struct creates the underlying properties.")]
public readonly record struct PacketToken(string Token, bool? IsLast, bool? EncounteredUpperLevel, bool PacketEndReached);
Do not follow this link