~ruther/NosSmooth

0143819ddc7ba385baa28f15928f6e532692acdc — František Boháček 3 years ago 53001de
fix: add missing packet event args
A Core/NosSmooth.Core/Packets/PacketEventArgs.cs => Core/NosSmooth.Core/Packets/PacketEventArgs.cs +17 -0
@@ 0,0 1,17 @@
//
//  PacketEventArgs.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 NosCore.Packets.Interfaces;

namespace NosSmooth.Core.Packets;

/// <summary>
/// Arguments for <see cref="IPacketResponder{TPacket}"/>
/// </summary>
/// <param name="Type">The type of the packet.</param>
/// <param name="Packet">The deserialized packet.</param>
/// <param name="PacketString">The packet string.</param>
public record PacketEventArgs<TPacket>(PacketType Type, TPacket Packet, string PacketString);
\ No newline at end of file

A Core/NosSmooth.Core/Packets/PacketType.cs => Core/NosSmooth.Core/Packets/PacketType.cs +23 -0
@@ 0,0 1,23 @@
//
//  PacketType.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.

namespace NosSmooth.Core.Packets;

/// <summary>
/// The type of the packet.
/// </summary>
public enum PacketType
{
    /// <summary>
    /// The packet was sent to the server.
    /// </summary>
    Sent,

    /// <summary>
    /// The packet was received from the server.
    /// </summary>
    Received,
}
\ No newline at end of file

Do not follow this link